clang  17.0.0git
Sema.h
Go to the documentation of this file.
1 //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the Sema class, which performs semantic analysis and
10 // builds ASTs.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_SEMA_SEMA_H
15 #define LLVM_CLANG_SEMA_SEMA_H
16 
17 #include "clang/AST/ASTConcept.h"
18 #include "clang/AST/ASTFwd.h"
19 #include "clang/AST/Attr.h"
20 #include "clang/AST/Availability.h"
22 #include "clang/AST/DeclTemplate.h"
24 #include "clang/AST/Expr.h"
25 #include "clang/AST/ExprCXX.h"
26 #include "clang/AST/ExprConcepts.h"
27 #include "clang/AST/ExprObjC.h"
28 #include "clang/AST/ExprOpenMP.h"
30 #include "clang/AST/LocInfoType.h"
32 #include "clang/AST/NSAPI.h"
34 #include "clang/AST/StmtCXX.h"
35 #include "clang/AST/StmtOpenMP.h"
36 #include "clang/AST/TypeLoc.h"
37 #include "clang/AST/TypeOrdering.h"
39 #include "clang/Basic/Builtins.h"
42 #include "clang/Basic/Module.h"
46 #include "clang/Basic/Specifiers.h"
48 #include "clang/Basic/TypeTraits.h"
50 #include "clang/Sema/CleanupInfo.h"
51 #include "clang/Sema/DeclSpec.h"
55 #include "clang/Sema/Ownership.h"
56 #include "clang/Sema/Scope.h"
57 #include "clang/Sema/SemaConcept.h"
59 #include "clang/Sema/Weak.h"
60 #include "llvm/ADT/ArrayRef.h"
61 #include "llvm/ADT/SetVector.h"
62 #include "llvm/ADT/SmallBitVector.h"
63 #include "llvm/ADT/SmallPtrSet.h"
64 #include "llvm/ADT/SmallSet.h"
65 #include "llvm/ADT/SmallVector.h"
66 #include "llvm/ADT/TinyPtrVector.h"
67 #include "llvm/Frontend/OpenMP/OMPConstants.h"
68 #include <deque>
69 #include <memory>
70 #include <optional>
71 #include <string>
72 #include <tuple>
73 #include <vector>
74 
75 namespace llvm {
76  class APSInt;
77  template <typename ValueT, typename ValueInfoT> class DenseSet;
78  class SmallBitVector;
79  struct InlineAsmIdentifierInfo;
80 }
81 
82 namespace clang {
83  class ADLResult;
84  class ASTConsumer;
85  class ASTContext;
86  class ASTMutationListener;
87  class ASTReader;
88  class ASTWriter;
89  class ArrayType;
90  class ParsedAttr;
91  class BindingDecl;
92  class BlockDecl;
93  class CapturedDecl;
94  class CXXBasePath;
95  class CXXBasePaths;
96  class CXXBindTemporaryExpr;
98  class CXXConstructorDecl;
99  class CXXConversionDecl;
100  class CXXDeleteExpr;
101  class CXXDestructorDecl;
102  class CXXFieldCollector;
103  class CXXMemberCallExpr;
104  class CXXMethodDecl;
105  class CXXScopeSpec;
106  class CXXTemporary;
107  class CXXTryStmt;
108  class CallExpr;
109  class ClassTemplateDecl;
110  class ClassTemplatePartialSpecializationDecl;
111  class ClassTemplateSpecializationDecl;
112  class VarTemplatePartialSpecializationDecl;
113  class CodeCompleteConsumer;
114  class CodeCompletionAllocator;
115  class CodeCompletionTUInfo;
116  class CodeCompletionResult;
117  class CoroutineBodyStmt;
118  class Decl;
119  class DeclAccessPair;
120  class DeclContext;
121  class DeclRefExpr;
122  class DeclaratorDecl;
123  class DeducedTemplateArgument;
124  class DependentDiagnostic;
125  class DesignatedInitExpr;
126  class Designation;
127  class EnableIfAttr;
128  class EnumConstantDecl;
129  class Expr;
130  class ExtVectorType;
131  class FormatAttr;
132  class FriendDecl;
133  class FunctionDecl;
134  class FunctionProtoType;
135  class FunctionTemplateDecl;
136  class ImplicitConversionSequence;
138  class InitListExpr;
139  class InitializationKind;
140  class InitializationSequence;
141  class InitializedEntity;
142  class IntegerLiteral;
143  class LabelStmt;
144  class LambdaExpr;
145  class LangOptions;
146  class LocalInstantiationScope;
147  class LookupResult;
148  class MacroInfo;
150  class ModuleLoader;
151  class MultiLevelTemplateArgumentList;
152  class NamedDecl;
153  class ObjCCategoryDecl;
154  class ObjCCategoryImplDecl;
155  class ObjCCompatibleAliasDecl;
156  class ObjCContainerDecl;
157  class ObjCImplDecl;
158  class ObjCImplementationDecl;
159  class ObjCInterfaceDecl;
160  class ObjCIvarDecl;
161  template <class T> class ObjCList;
162  class ObjCMessageExpr;
163  class ObjCMethodDecl;
164  class ObjCPropertyDecl;
165  class ObjCProtocolDecl;
166  class OMPThreadPrivateDecl;
167  class OMPRequiresDecl;
168  class OMPDeclareReductionDecl;
169  class OMPDeclareSimdDecl;
170  class OMPClause;
171  struct OMPVarListLocTy;
172  struct OverloadCandidate;
173  enum class OverloadCandidateParamOrder : char;
175  class OverloadCandidateSet;
176  class OverloadExpr;
177  class ParenListExpr;
178  class ParmVarDecl;
179  class Preprocessor;
180  class PseudoDestructorTypeStorage;
181  class PseudoObjectExpr;
182  class QualType;
183  class StandardConversionSequence;
184  class Stmt;
185  class StringLiteral;
186  class SwitchStmt;
187  class TemplateArgument;
188  class TemplateArgumentList;
189  class TemplateArgumentLoc;
190  class TemplateDecl;
191  class TemplateInstantiationCallback;
192  class TemplateParameterList;
193  class TemplatePartialOrderingContext;
194  class TemplateTemplateParmDecl;
195  class Token;
196  class TypeAliasDecl;
197  class TypedefDecl;
198  class TypedefNameDecl;
199  class TypeLoc;
200  class TypoCorrectionConsumer;
201  class UnqualifiedId;
202  class UnresolvedLookupExpr;
203  class UnresolvedMemberExpr;
204  class UnresolvedSetImpl;
205  class UnresolvedSetIterator;
206  class UsingDecl;
207  class UsingShadowDecl;
208  class ValueDecl;
209  class VarDecl;
210  class VarTemplateSpecializationDecl;
211  class VisibilityAttr;
212  class VisibleDeclConsumer;
213  class IndirectFieldDecl;
214  struct DeductionFailureInfo;
215  class TemplateSpecCandidateSet;
216 
217 namespace sema {
218  class AccessedEntity;
219  class BlockScopeInfo;
220  class Capture;
221  class CapturedRegionScopeInfo;
222  class CapturingScopeInfo;
223  class CompoundScopeInfo;
224  class DelayedDiagnostic;
225  class DelayedDiagnosticPool;
226  class FunctionScopeInfo;
227  class LambdaScopeInfo;
228  class PossiblyUnreachableDiag;
229  class RISCVIntrinsicManager;
230  class SemaPPCallbacks;
231  class TemplateDeductionInfo;
232 }
233 
234 namespace threadSafety {
235  class BeforeSet;
236  void threadSafetyCleanup(BeforeSet* Cache);
237 }
238 
239 // FIXME: No way to easily map from TemplateTypeParmTypes to
240 // TemplateTypeParmDecls, so we have this horrible PointerUnion.
241 using UnexpandedParameterPack = std::pair<
242  llvm::PointerUnion<
243  const TemplateTypeParmType *, const SubstTemplateTypeParmPackType *,
244  const SubstNonTypeTemplateParmPackExpr *, const NamedDecl *>,
246 
247 /// Describes whether we've seen any nullability information for the given
248 /// file.
250  /// The first pointer declarator (of any pointer kind) in the file that does
251  /// not have a corresponding nullability annotation.
253 
254  /// The end location for the first pointer declarator in the file. Used for
255  /// placing fix-its.
257 
258  /// Which kind of pointer declarator we saw.
259  uint8_t PointerKind;
260 
261  /// Whether we saw any type nullability annotations in the given file.
262  bool SawTypeNullability = false;
263 };
264 
265 /// A mapping from file IDs to a record of whether we've seen nullability
266 /// information in that file.
268  /// A mapping from file IDs to the nullability information for each file ID.
269  llvm::DenseMap<FileID, FileNullability> Map;
270 
271  /// A single-element cache based on the file ID.
272  struct {
275  } Cache;
276 
277 public:
279  // Check the single-element cache.
280  if (file == Cache.File)
281  return Cache.Nullability;
282 
283  // It's not in the single-element cache; flush the cache if we have one.
284  if (!Cache.File.isInvalid()) {
285  Map[Cache.File] = Cache.Nullability;
286  }
287 
288  // Pull this entry into the cache.
289  Cache.File = file;
290  Cache.Nullability = Map[file];
291  return Cache.Nullability;
292  }
293 };
294 
295 /// Tracks expected type during expression parsing, for use in code completion.
296 /// The type is tied to a particular token, all functions that update or consume
297 /// the type take a start location of the token they are looking at as a
298 /// parameter. This avoids updating the type on hot paths in the parser.
300 public:
301  PreferredTypeBuilder(bool Enabled) : Enabled(Enabled) {}
302 
303  void enterCondition(Sema &S, SourceLocation Tok);
304  void enterReturn(Sema &S, SourceLocation Tok);
305  void enterVariableInit(SourceLocation Tok, Decl *D);
306  /// Handles e.g. BaseType{ .D = Tok...
308  const Designation &D);
309  /// Computing a type for the function argument may require running
310  /// overloading, so we postpone its computation until it is actually needed.
311  ///
312  /// Clients should be very careful when using this function, as it stores a
313  /// function_ref, clients should make sure all calls to get() with the same
314  /// location happen while function_ref is alive.
315  ///
316  /// The callback should also emit signature help as a side-effect, but only
317  /// if the completion point has been reached.
319  llvm::function_ref<QualType()> ComputeType);
320 
321  void enterParenExpr(SourceLocation Tok, SourceLocation LParLoc);
322  void enterUnary(Sema &S, SourceLocation Tok, tok::TokenKind OpKind,
323  SourceLocation OpLoc);
324  void enterBinary(Sema &S, SourceLocation Tok, Expr *LHS, tok::TokenKind Op);
325  void enterMemAccess(Sema &S, SourceLocation Tok, Expr *Base);
326  void enterSubscript(Sema &S, SourceLocation Tok, Expr *LHS);
327  /// Handles all type casts, including C-style cast, C++ casts, etc.
329 
330  /// Get the expected type associated with this location, if any.
331  ///
332  /// If the location is a function argument, determining the expected type
333  /// involves considering all function overloads and the arguments so far.
334  /// In this case, signature help for these function overloads will be reported
335  /// as a side-effect (only if the completion point has been reached).
337  if (!Enabled || Tok != ExpectedLoc)
338  return QualType();
339  if (!Type.isNull())
340  return Type;
341  if (ComputeType)
342  return ComputeType();
343  return QualType();
344  }
345 
346 private:
347  bool Enabled;
348  /// Start position of a token for which we store expected type.
349  SourceLocation ExpectedLoc;
350  /// Expected type for a token starting at ExpectedLoc.
351  QualType Type;
352  /// A function to compute expected type at ExpectedLoc. It is only considered
353  /// if Type is null.
354  llvm::function_ref<QualType()> ComputeType;
355 };
356 
357 /// Sema - This implements semantic analysis and AST building for C.
358 class Sema final {
359  Sema(const Sema &) = delete;
360  void operator=(const Sema &) = delete;
361 
362  ///Source of additional semantic information.
364 
365  static bool mightHaveNonExternalLinkage(const DeclaratorDecl *FD);
366 
367  /// Determine whether two declarations should be linked together, given that
368  /// the old declaration might not be visible and the new declaration might
369  /// not have external linkage.
370  bool shouldLinkPossiblyHiddenDecl(const NamedDecl *Old,
371  const NamedDecl *New) {
372  if (isVisible(Old))
373  return true;
374  // See comment in below overload for why it's safe to compute the linkage
375  // of the new declaration here.
376  if (New->isExternallyDeclarable()) {
377  assert(Old->isExternallyDeclarable() &&
378  "should not have found a non-externally-declarable previous decl");
379  return true;
380  }
381  return false;
382  }
383  bool shouldLinkPossiblyHiddenDecl(LookupResult &Old, const NamedDecl *New);
384 
385  void setupImplicitSpecialMemberType(CXXMethodDecl *SpecialMem,
386  QualType ResultTy,
387  ArrayRef<QualType> Args);
388 
389 public:
390  /// The maximum alignment, same as in llvm::Value. We duplicate them here
391  /// because that allows us not to duplicate the constants in clang code,
392  /// which we must to since we can't directly use the llvm constants.
393  /// The value is verified against llvm here: lib/CodeGen/CGDecl.cpp
394  ///
395  /// This is the greatest alignment value supported by load, store, and alloca
396  /// instructions, and global values.
397  static const unsigned MaxAlignmentExponent = 32;
399 
403 
406 
413 
414  /// Flag indicating whether or not to collect detailed statistics.
416 
417  /// Code-completion consumer.
419 
420  /// CurContext - This is the current declaration context of parsing.
422 
423  /// Generally null except when we temporarily switch decl contexts,
424  /// like in \see ActOnObjCTemporaryExitContainerContext.
426 
427  /// VAListTagName - The declaration name corresponding to __va_list_tag.
428  /// This is used as part of a hack to omit that class from ADL results.
430 
431  bool MSStructPragmaOn; // True when \#pragma ms_struct on
432 
433  /// Controls member pointer representation format under the MS ABI.
436 
437  /// Stack of active SEH __finally scopes. Can be empty.
439 
440  /// Source location for newly created implicit MSInheritanceAttrs
442 
443  /// Holds TypoExprs that are created from `createDelayedTypo`. This is used by
444  /// `TransformTypos` in order to keep track of any TypoExprs that are created
445  /// recursively during typo correction and wipe them away if the correction
446  /// fails.
448 
449  /// pragma clang section kind
452  PCSK_BSS = 1,
457  };
458 
460  PCSA_Set = 0,
462  };
463 
466  bool Valid = false;
468  };
469 
475 
477  PSK_Reset = 0x0, // #pragma ()
478  PSK_Set = 0x1, // #pragma (value)
479  PSK_Push = 0x2, // #pragma (push[, id])
480  PSK_Pop = 0x4, // #pragma (pop[, id])
481  PSK_Show = 0x8, // #pragma (show) -- only for "pack"!
482  PSK_Push_Set = PSK_Push | PSK_Set, // #pragma (push[, id], value)
483  PSK_Pop_Set = PSK_Pop | PSK_Set, // #pragma (pop[, id], value)
484  };
485 
486  struct PragmaPackInfo {
488  StringRef SlotLabel;
490  };
491 
492  // #pragma pack and align.
494  public:
495  // `Native` represents default align mode, which may vary based on the
496  // platform.
497  enum Mode : unsigned char { Native, Natural, Packed, Mac68k };
498 
499  // #pragma pack info constructor
500  AlignPackInfo(AlignPackInfo::Mode M, unsigned Num, bool IsXL)
501  : PackAttr(true), AlignMode(M), PackNumber(Num), XLStack(IsXL) {
502  assert(Num == PackNumber && "The pack number has been truncated.");
503  }
504 
505  // #pragma align info constructor
507  : PackAttr(false), AlignMode(M),
508  PackNumber(M == Packed ? 1 : UninitPackVal), XLStack(IsXL) {}
509 
510  explicit AlignPackInfo(bool IsXL) : AlignPackInfo(Native, IsXL) {}
511 
513 
514  // When a AlignPackInfo itself cannot be used, this returns an 32-bit
515  // integer encoding for it. This should only be passed to
516  // AlignPackInfo::getFromRawEncoding, it should not be inspected directly.
517  static uint32_t getRawEncoding(const AlignPackInfo &Info) {
518  std::uint32_t Encoding{};
519  if (Info.IsXLStack())
520  Encoding |= IsXLMask;
521 
522  Encoding |= static_cast<uint32_t>(Info.getAlignMode()) << 1;
523 
524  if (Info.IsPackAttr())
525  Encoding |= PackAttrMask;
526 
527  Encoding |= static_cast<uint32_t>(Info.getPackNumber()) << 4;
528 
529  return Encoding;
530  }
531 
533  bool IsXL = static_cast<bool>(Encoding & IsXLMask);
535  static_cast<AlignPackInfo::Mode>((Encoding & AlignModeMask) >> 1);
536  int PackNumber = (Encoding & PackNumMask) >> 4;
537 
538  if (Encoding & PackAttrMask)
539  return AlignPackInfo(M, PackNumber, IsXL);
540 
541  return AlignPackInfo(M, IsXL);
542  }
543 
544  bool IsPackAttr() const { return PackAttr; }
545 
546  bool IsAlignAttr() const { return !PackAttr; }
547 
548  Mode getAlignMode() const { return AlignMode; }
549 
550  unsigned getPackNumber() const { return PackNumber; }
551 
552  bool IsPackSet() const {
553  // #pragma align, #pragma pack(), and #pragma pack(0) do not set the pack
554  // attriute on a decl.
555  return PackNumber != UninitPackVal && PackNumber != 0;
556  }
557 
558  bool IsXLStack() const { return XLStack; }
559 
560  bool operator==(const AlignPackInfo &Info) const {
561  return std::tie(AlignMode, PackNumber, PackAttr, XLStack) ==
562  std::tie(Info.AlignMode, Info.PackNumber, Info.PackAttr,
563  Info.XLStack);
564  }
565 
566  bool operator!=(const AlignPackInfo &Info) const {
567  return !(*this == Info);
568  }
569 
570  private:
571  /// \brief True if this is a pragma pack attribute,
572  /// not a pragma align attribute.
573  bool PackAttr;
574 
575  /// \brief The alignment mode that is in effect.
576  Mode AlignMode;
577 
578  /// \brief The pack number of the stack.
579  unsigned char PackNumber;
580 
581  /// \brief True if it is a XL #pragma align/pack stack.
582  bool XLStack;
583 
584  /// \brief Uninitialized pack value.
585  static constexpr unsigned char UninitPackVal = -1;
586 
587  // Masks to encode and decode an AlignPackInfo.
588  static constexpr uint32_t IsXLMask{0x0000'0001};
589  static constexpr uint32_t AlignModeMask{0x0000'0006};
590  static constexpr uint32_t PackAttrMask{0x00000'0008};
591  static constexpr uint32_t PackNumMask{0x0000'01F0};
592  };
593 
594  template<typename ValueType>
595  struct PragmaStack {
596  struct Slot {
597  llvm::StringRef StackSlotLabel;
598  ValueType Value;
601  Slot(llvm::StringRef StackSlotLabel, ValueType Value,
606  };
607 
608  void Act(SourceLocation PragmaLocation, PragmaMsStackAction Action,
609  llvm::StringRef StackSlotLabel, ValueType Value) {
610  if (Action == PSK_Reset) {
612  CurrentPragmaLocation = PragmaLocation;
613  return;
614  }
615  if (Action & PSK_Push)
616  Stack.emplace_back(StackSlotLabel, CurrentValue, CurrentPragmaLocation,
617  PragmaLocation);
618  else if (Action & PSK_Pop) {
619  if (!StackSlotLabel.empty()) {
620  // If we've got a label, try to find it and jump there.
621  auto I = llvm::find_if(llvm::reverse(Stack), [&](const Slot &x) {
622  return x.StackSlotLabel == StackSlotLabel;
623  });
624  // If we found the label so pop from there.
625  if (I != Stack.rend()) {
626  CurrentValue = I->Value;
627  CurrentPragmaLocation = I->PragmaLocation;
628  Stack.erase(std::prev(I.base()), Stack.end());
629  }
630  } else if (!Stack.empty()) {
631  // We do not have a label, just pop the last entry.
632  CurrentValue = Stack.back().Value;
633  CurrentPragmaLocation = Stack.back().PragmaLocation;
634  Stack.pop_back();
635  }
636  }
637  if (Action & PSK_Set) {
639  CurrentPragmaLocation = PragmaLocation;
640  }
641  }
642 
643  // MSVC seems to add artificial slots to #pragma stacks on entering a C++
644  // method body to restore the stacks on exit, so it works like this:
645  //
646  // struct S {
647  // #pragma <name>(push, InternalPragmaSlot, <current_pragma_value>)
648  // void Method {}
649  // #pragma <name>(pop, InternalPragmaSlot)
650  // };
651  //
652  // It works even with #pragma vtordisp, although MSVC doesn't support
653  // #pragma vtordisp(push [, id], n)
654  // syntax.
655  //
656  // Push / pop a named sentinel slot.
657  void SentinelAction(PragmaMsStackAction Action, StringRef Label) {
658  assert((Action == PSK_Push || Action == PSK_Pop) &&
659  "Can only push / pop #pragma stack sentinels!");
661  }
662 
663  // Constructors.
664  explicit PragmaStack(const ValueType &Default)
666 
667  bool hasValue() const { return CurrentValue != DefaultValue; }
668 
670  ValueType DefaultValue; // Value used for PSK_Reset action.
671  ValueType CurrentValue;
673  };
674  // FIXME: We should serialize / deserialize these if they occur in a PCH (but
675  // we shouldn't do so if they're in a module).
676 
677  /// Whether to insert vtordisps prior to virtual bases in the Microsoft
678  /// C++ ABI. Possible values are 0, 1, and 2, which mean:
679  ///
680  /// 0: Suppress all vtordisps
681  /// 1: Insert vtordisps in the presence of vbase overrides and non-trivial
682  /// structors
683  /// 2: Always insert vtordisps to support RTTI on partially constructed
684  /// objects
687  // The current #pragma align/pack values and locations at each #include.
692  };
694  // Segment #pragmas.
699 
700  // #pragma strict_gs_check.
702 
703  // This stack tracks the current state of Sema.CurFPFeatures.
706  FPOptionsOverride result;
707  if (!FpPragmaStack.hasValue()) {
708  result = FPOptionsOverride();
709  } else {
710  result = FpPragmaStack.CurrentValue;
711  }
712  return result;
713  }
714 
715  // RAII object to push / pop sentinel slots for all MS #pragma stacks.
716  // Actions should be performed only if we enter / exit a C++ method body.
718  public:
719  PragmaStackSentinelRAII(Sema &S, StringRef SlotLabel, bool ShouldAct);
721 
722  private:
723  Sema &S;
724  StringRef SlotLabel;
725  bool ShouldAct;
726  };
727 
728  /// A mapping that describes the nullability we've seen in each header file.
730 
731  /// Last section used with #pragma init_seg.
734 
735  /// Sections used with #pragma alloc_text.
736  llvm::StringMap<std::tuple<StringRef, SourceLocation>> FunctionToSectionMap;
737 
738  /// VisContext - Manages the stack for \#pragma GCC visibility.
739  void *VisContext; // Really a "PragmaVisStack*"
740 
741  /// This an attribute introduced by \#pragma clang attribute.
746  bool IsUsed;
747  };
748 
749  /// A push'd group of PragmaAttributeEntries.
751  /// The location of the push attribute.
753  /// The namespace of this push group.
756  };
757 
759 
760  /// The declaration that is currently receiving an attribute from the
761  /// #pragma attribute stack.
763 
764  /// This represents the last location of a "#pragma clang optimize off"
765  /// directive if such a directive has not been closed by an "on" yet. If
766  /// optimizations are currently "on", this is set to an invalid location.
768 
769  /// The "on" or "off" argument passed by \#pragma optimize, that denotes
770  /// whether the optimizations in the list passed to the pragma should be
771  /// turned off or on. This boolean is true by default because command line
772  /// options are honored when `#pragma optimize("", on)`.
773  /// (i.e. `ModifyFnAttributeMSPragmaOptimze()` does nothing)
774  bool MSPragmaOptimizeIsOn = true;
775 
776  /// Set of no-builtin functions listed by \#pragma function.
778 
779  /// Flag indicating if Sema is building a recovery call expression.
780  ///
781  /// This flag is used to avoid building recovery call expressions
782  /// if Sema is already doing so, which would cause infinite recursions.
784 
785  /// Used to control the generation of ExprWithCleanups.
787 
788  /// ExprCleanupObjects - This is the stack of objects requiring
789  /// cleanup that are created by the current full expression.
791 
792  /// Store a set of either DeclRefExprs or MemberExprs that contain a reference
793  /// to a variable (constant) that may or may not be odr-used in this Expr, and
794  /// we won't know until all lvalue-to-rvalue and discarded value conversions
795  /// have been applied to all subexpressions of the enclosing full expression.
796  /// This is cleared at the end of each full expression.
797  using MaybeODRUseExprSet = llvm::SetVector<Expr *, SmallVector<Expr *, 4>,
800 
801  std::unique_ptr<sema::FunctionScopeInfo> CachedFunctionScope;
802 
803  /// Stack containing information about each of the nested
804  /// function, block, and method scopes that are currently active.
806 
807  /// The index of the first FunctionScope that corresponds to the current
808  /// context.
809  unsigned FunctionScopesStart = 0;
810 
813  FunctionScopes.end());
814  }
815 
816  /// Stack containing information needed when in C++2a an 'auto' is encountered
817  /// in a function declaration parameter type specifier in order to invent a
818  /// corresponding template parameter in the enclosing abbreviated function
819  /// template. This information is also present in LambdaScopeInfo, stored in
820  /// the FunctionScopes stack.
822 
823  /// The index of the first InventedParameterInfo that refers to the current
824  /// context.
826 
828  return llvm::ArrayRef(InventedParameterInfos.begin() +
830  InventedParameterInfos.end());
831  }
832 
836 
837  /// ExtVectorDecls - This is a list all the extended vector types. This allows
838  /// us to associate a raw vector type with one of the ext_vector type names.
839  /// This is only necessary for issuing pretty diagnostics.
841 
842  /// FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
843  std::unique_ptr<CXXFieldCollector> FieldCollector;
844 
846 
847  /// Set containing all declared private fields that are not used.
849 
850  /// Set containing all typedefs that are likely unused.
853 
854  /// Delete-expressions to be analyzed at the end of translation unit
855  ///
856  /// This list contains class members, and locations of delete-expressions
857  /// that could not be proven as to whether they mismatch with new-expression
858  /// used in initializer of the field.
859  typedef std::pair<SourceLocation, bool> DeleteExprLoc;
861  llvm::MapVector<FieldDecl *, DeleteLocs> DeleteExprs;
862 
864 
865  /// PureVirtualClassDiagSet - a set of class declarations which we have
866  /// emitted a list of pure virtual functions. Used to prevent emitting the
867  /// same list more than once.
868  std::unique_ptr<RecordDeclSetTy> PureVirtualClassDiagSet;
869 
870  /// ParsingInitForAutoVars - a set of declarations with auto types for which
871  /// we are currently parsing the initializer.
873 
874  /// Look for a locally scoped extern "C" declaration by the given name.
876 
880 
881  /// All the tentative definitions encountered in the TU.
883 
884  /// All the external declarations encoutered and used in the TU.
886 
890 
891  /// The set of file scoped decls seen so far that have not been used
892  /// and must warn if not used. Only contains the first declaration.
894 
898 
899  /// All the delegating constructors seen so far in the file, used for
900  /// cycle detection at the end of the TU.
902 
903  /// All the overriding functions seen during a class definition
904  /// that had their exception spec checks delayed, plus the overridden
905  /// function.
908 
909  /// All the function redeclarations seen during a class definition that had
910  /// their exception spec checks delayed, plus the prior declaration they
911  /// should be checked against. Except during error recovery, the new decl
912  /// should always be a friend declaration, as that's the only valid way to
913  /// redeclare a special member before its class is complete.
916 
917  typedef llvm::MapVector<const FunctionDecl *,
918  std::unique_ptr<LateParsedTemplate>>
921 
922  /// Callback to the parser to parse templated functions when needed.
923  typedef void LateTemplateParserCB(void *P, LateParsedTemplate &LPT);
924  typedef void LateTemplateParserCleanupCB(void *P);
928 
930  LateTemplateParserCleanupCB *LTPCleanup,
931  void *P) {
932  LateTemplateParser = LTP;
933  LateTemplateParserCleanup = LTPCleanup;
934  OpaqueParser = P;
935  }
936 
937  class DelayedDiagnostics;
938 
940  sema::DelayedDiagnosticPool *SavedPool;
942  };
945 
946  /// A class which encapsulates the logic for delaying diagnostics
947  /// during parsing and other processing.
949  /// The current pool of diagnostics into which delayed
950  /// diagnostics should go.
952 
953  public:
954  DelayedDiagnostics() : CurPool(nullptr) {}
955 
956  /// Adds a delayed diagnostic.
957  void add(const sema::DelayedDiagnostic &diag); // in DelayedDiagnostic.h
958 
959  /// Determines whether diagnostics should be delayed.
960  bool shouldDelayDiagnostics() { return CurPool != nullptr; }
961 
962  /// Returns the current delayed-diagnostics pool.
964  return CurPool;
965  }
966 
967  /// Enter a new scope. Access and deprecation diagnostics will be
968  /// collected in this pool.
971  state.SavedPool = CurPool;
972  CurPool = &pool;
973  return state;
974  }
975 
976  /// Leave a delayed-diagnostic state that was previously pushed.
977  /// Do not emit any of the diagnostics. This is performed as part
978  /// of the bookkeeping of popping a pool "properly".
980  CurPool = state.SavedPool;
981  }
982 
983  /// Enter a new scope where access and deprecation diagnostics are
984  /// not delayed.
987  state.SavedPool = CurPool;
988  CurPool = nullptr;
989  return state;
990  }
991 
992  /// Undo a previous pushUndelayed().
994  assert(CurPool == nullptr);
995  CurPool = state.SavedPool;
996  }
998 
999  /// A RAII object to temporarily push a declaration context.
1000  class ContextRAII {
1001  private:
1002  Sema &S;
1003  DeclContext *SavedContext;
1004  ProcessingContextState SavedContextState;
1005  QualType SavedCXXThisTypeOverride;
1006  unsigned SavedFunctionScopesStart;
1007  unsigned SavedInventedParameterInfosStart;
1008 
1009  public:
1010  ContextRAII(Sema &S, DeclContext *ContextToPush, bool NewThisContext = true)
1011  : S(S), SavedContext(S.CurContext),
1012  SavedContextState(S.DelayedDiagnostics.pushUndelayed()),
1013  SavedCXXThisTypeOverride(S.CXXThisTypeOverride),
1014  SavedFunctionScopesStart(S.FunctionScopesStart),
1015  SavedInventedParameterInfosStart(S.InventedParameterInfosStart)
1016  {
1017  assert(ContextToPush && "pushing null context");
1018  S.CurContext = ContextToPush;
1019  if (NewThisContext)
1020  S.CXXThisTypeOverride = QualType();
1021  // Any saved FunctionScopes do not refer to this context.
1022  S.FunctionScopesStart = S.FunctionScopes.size();
1023  S.InventedParameterInfosStart = S.InventedParameterInfos.size();
1024  }
1025 
1026  void pop() {
1027  if (!SavedContext) return;
1028  S.CurContext = SavedContext;
1029  S.DelayedDiagnostics.popUndelayed(SavedContextState);
1030  S.CXXThisTypeOverride = SavedCXXThisTypeOverride;
1031  S.FunctionScopesStart = SavedFunctionScopesStart;
1032  S.InventedParameterInfosStart = SavedInventedParameterInfosStart;
1033  SavedContext = nullptr;
1034  }
1035 
1037  pop();
1038  }
1039  };
1040 
1041  /// Whether the AST is currently being rebuilt to correct immediate
1042  /// invocations. Immediate invocation candidates and references to consteval
1043  /// functions aren't tracked when this is set.
1045 
1046  /// Used to change context to isConstantEvaluated without pushing a heavy
1047  /// ExpressionEvaluationContextRecord object.
1049 
1051  return ExprEvalContexts.back().isConstantEvaluated() ||
1053  }
1054 
1055  /// RAII object to handle the state changes required to synthesize
1056  /// a function body.
1058  Sema &S;
1059  Sema::ContextRAII SavedContext;
1060  bool PushedCodeSynthesisContext = false;
1061 
1062  public:
1064  : S(S), SavedContext(S, DC) {
1065  S.PushFunctionScope();
1066  S.PushExpressionEvaluationContext(
1068  if (auto *FD = dyn_cast<FunctionDecl>(DC))
1069  FD->setWillHaveBody(true);
1070  else
1071  assert(isa<ObjCMethodDecl>(DC));
1072  }
1073 
1075  assert(!PushedCodeSynthesisContext);
1076 
1079  Ctx.PointOfInstantiation = UseLoc;
1080  Ctx.Entity = cast<Decl>(S.CurContext);
1081  S.pushCodeSynthesisContext(Ctx);
1082 
1083  PushedCodeSynthesisContext = true;
1084  }
1085 
1087  if (PushedCodeSynthesisContext)
1088  S.popCodeSynthesisContext();
1089  if (auto *FD = dyn_cast<FunctionDecl>(S.CurContext))
1090  FD->setWillHaveBody(false);
1091  S.PopExpressionEvaluationContext();
1092  S.PopFunctionScopeInfo();
1093  }
1094  };
1095 
1096  /// WeakUndeclaredIdentifiers - Identifiers contained in \#pragma weak before
1097  /// declared. Rare. May alias another identifier, declared or undeclared.
1098  ///
1099  /// For aliases, the target identifier is used as a key for eventual
1100  /// processing when the target is declared. For the single-identifier form,
1101  /// the sole identifier is used as the key. Each entry is a `SetVector`
1102  /// (ordered by parse order) of aliases (identified by the alias name) in case
1103  /// of multiple aliases to the same undeclared identifier.
1104  llvm::MapVector<
1105  IdentifierInfo *,
1106  llvm::SetVector<
1108  llvm::SmallDenseSet<WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly>>>
1110 
1111  /// ExtnameUndeclaredIdentifiers - Identifiers contained in
1112  /// \#pragma redefine_extname before declared. Used in Solaris system headers
1113  /// to define functions that occur in multiple standards to call the version
1114  /// in the currently selected standard.
1115  llvm::DenseMap<IdentifierInfo*,AsmLabelAttr*> ExtnameUndeclaredIdentifiers;
1116 
1117 
1118  /// Load weak undeclared identifiers from the external source.
1120 
1121  /// WeakTopLevelDecl - Translation-unit scoped declarations generated by
1122  /// \#pragma weak during processing of other Decls.
1123  /// I couldn't figure out a clean way to generate these in-line, so
1124  /// we store them here and handle separately -- which is a hack.
1125  /// It would be best to refactor this.
1127 
1129 
1130  /// Translation Unit Scope - useful to Objective-C actions that need
1131  /// to lookup file scope declarations in the "ordinary" C decl namespace.
1132  /// For example, user-defined classes, built-in "id" type, etc.
1134 
1135  /// The C++ "std" namespace, where the standard library resides.
1137 
1138  /// The C++ "std::bad_alloc" class, which is defined by the C++
1139  /// standard library.
1141 
1142  /// The C++ "std::align_val_t" enum class, which is defined by the C++
1143  /// standard library.
1145 
1146  /// The C++ "std::experimental" namespace, where the experimental parts
1147  /// of the standard library resides.
1149 
1150  /// The C++ "std::initializer_list" template, which is defined in
1151  /// <initializer_list>.
1153 
1154  /// The C++ "std::coroutine_traits" template, which is defined in
1155  /// <coroutine_traits>
1157  /// The namespace where coroutine components are defined. In standard,
1158  /// they are defined in std namespace. And in the previous implementation,
1159  /// they are defined in std::experimental namespace.
1161 
1162  /// The C++ "type_info" declaration, which is defined in <typeinfo>.
1164 
1165  /// The MSVC "_GUID" struct, which is defined in MSVC header files.
1167 
1168  /// The C++ "std::source_location::__impl" struct, defined in
1169  /// <source_location>.
1171 
1172  /// Caches identifiers/selectors for NSFoundation APIs.
1173  std::unique_ptr<NSAPI> NSAPIObj;
1174 
1175  /// The declaration of the Objective-C NSNumber class.
1177 
1178  /// The declaration of the Objective-C NSValue class.
1180 
1181  /// Pointer to NSNumber type (NSNumber *).
1183 
1184  /// Pointer to NSValue type (NSValue *).
1186 
1187  /// The Objective-C NSNumber methods used to create NSNumber literals.
1189 
1190  /// The declaration of the Objective-C NSString class.
1192 
1193  /// Pointer to NSString type (NSString *).
1195 
1196  /// The declaration of the stringWithUTF8String: method.
1198 
1199  /// The declaration of the valueWithBytes:objCType: method.
1201 
1202  /// The declaration of the Objective-C NSArray class.
1204 
1205  /// The declaration of the arrayWithObjects:count: method.
1207 
1208  /// The declaration of the Objective-C NSDictionary class.
1210 
1211  /// The declaration of the dictionaryWithObjects:forKeys:count: method.
1213 
1214  /// id<NSCopying> type.
1216 
1217  /// will hold 'respondsToSelector:'
1219 
1220  /// A flag to remember whether the implicit forms of operator new and delete
1221  /// have been declared.
1223 
1224  /// Describes how the expressions currently being parsed are
1225  /// evaluated at run-time, if at all.
1227  /// The current expression and its subexpressions occur within an
1228  /// unevaluated operand (C++11 [expr]p7), such as the subexpression of
1229  /// \c sizeof, where the type of the expression may be significant but
1230  /// no code will be generated to evaluate the value of the expression at
1231  /// run time.
1232  Unevaluated,
1233 
1234  /// The current expression occurs within a braced-init-list within
1235  /// an unevaluated operand. This is mostly like a regular unevaluated
1236  /// context, except that we still instantiate constexpr functions that are
1237  /// referenced here so that we can perform narrowing checks correctly.
1239 
1240  /// The current expression occurs within a discarded statement.
1241  /// This behaves largely similarly to an unevaluated operand in preventing
1242  /// definitions from being required, but not in other ways.
1244 
1245  /// The current expression occurs within an unevaluated
1246  /// operand that unconditionally permits abstract references to
1247  /// fields, such as a SIZE operator in MS-style inline assembly.
1249 
1250  /// The current context is "potentially evaluated" in C++11 terms,
1251  /// but the expression is evaluated at compile-time (like the values of
1252  /// cases in a switch statement).
1254 
1255  /// In addition of being constant evaluated, the current expression
1256  /// occurs in an immediate function context - either a consteval function
1257  /// or a consteval if function.
1259 
1260  /// The current expression is potentially evaluated at run time,
1261  /// which means that code may be generated to evaluate the value of the
1262  /// expression at run time.
1264 
1265  /// The current expression is potentially evaluated, but any
1266  /// declarations referenced inside that expression are only used if
1267  /// in fact the current expression is used.
1268  ///
1269  /// This value is used when parsing default function arguments, for which
1270  /// we would like to provide diagnostics (e.g., passing non-POD arguments
1271  /// through varargs) but do not want to mark declarations as "referenced"
1272  /// until the default argument is used.
1274  };
1275 
1276  using ImmediateInvocationCandidate = llvm::PointerIntPair<ConstantExpr *, 1>;
1277 
1278  /// Data structure used to record current or nested
1279  /// expression evaluation contexts.
1281  /// The expression evaluation context.
1283 
1284  /// Whether the enclosing context needed a cleanup.
1286 
1287  /// The number of active cleanup objects when we entered
1288  /// this expression evaluation context.
1290 
1291  /// The number of typos encountered during this expression evaluation
1292  /// context (i.e. the number of TypoExprs created).
1293  unsigned NumTypos;
1294 
1296 
1297  /// The lambdas that are present within this context, if it
1298  /// is indeed an unevaluated context.
1300 
1301  /// The declaration that provides context for lambda expressions
1302  /// and block literals if the normal declaration context does not
1303  /// suffice, e.g., in a default function argument.
1305 
1306  /// If we are processing a decltype type, a set of call expressions
1307  /// for which we have deferred checking the completeness of the return type.
1309 
1310  /// If we are processing a decltype type, a set of temporary binding
1311  /// expressions for which we have deferred checking the destructor.
1313 
1315 
1316  /// Expressions appearing as the LHS of a volatile assignment in this
1317  /// context. We produce a warning for these when popping the context if
1318  /// they are not discarded-value expressions nor unevaluated operands.
1320 
1321  /// Set of candidates for starting an immediate invocation.
1323 
1324  /// Set of DeclRefExprs referencing a consteval function when used in a
1325  /// context not already known to be immediately invoked.
1327 
1328  /// \brief Describes whether we are in an expression constext which we have
1329  /// to handle differently.
1332  } ExprContext;
1333 
1334  // A context can be nested in both a discarded statement context and
1335  // an immediate function context, so they need to be tracked independently.
1338 
1340 
1341  // When evaluating immediate functions in the initializer of a default
1342  // argument or default member initializer, this is the declaration whose
1343  // default initializer is being evaluated and the location of the call
1344  // or constructor definition.
1348  : Loc(Loc), Decl(Decl), Context(Context) {
1349  assert(Decl && Context && "invalid initialization context");
1350  }
1351 
1353  ValueDecl *Decl = nullptr;
1354  DeclContext *Context = nullptr;
1355  };
1356  std::optional<InitializationContext> DelayedDefaultInitializationContext;
1357 
1359  unsigned NumCleanupObjects,
1367 
1368  bool isUnevaluated() const {
1372  }
1373 
1374  bool isConstantEvaluated() const {
1377  }
1378 
1383  // C++2b [expr.const]p14:
1384  // An expression or conversion is in an immediate function
1385  // context if it is potentially evaluated and either:
1386  // * its innermost enclosing non-block scope is a function
1387  // parameter scope of an immediate function, or
1388  // * its enclosing statement is enclosed by the compound-
1389  // statement of a consteval if statement.
1392  }
1393 
1396  (Context ==
1399  }
1400  };
1401 
1402  /// A stack of expression evaluation contexts.
1404 
1405  /// Emit a warning for all pending noderef expressions that we recorded.
1407 
1408  /// Compute the mangling number context for a lambda expression or
1409  /// block literal. Also return the extra mangling decl if any.
1410  ///
1411  /// \param DC - The DeclContext containing the lambda expression or
1412  /// block literal.
1413  std::tuple<MangleNumberingContext *, Decl *>
1415 
1416 
1417  /// SpecialMemberOverloadResult - The overloading result for a special member
1418  /// function.
1419  ///
1420  /// This is basically a wrapper around PointerIntPair. The lowest bits of the
1421  /// integer are used to determine whether overload resolution succeeded.
1423  public:
1424  enum Kind {
1428  };
1429 
1430  private:
1431  llvm::PointerIntPair<CXXMethodDecl *, 2> Pair;
1432 
1433  public:
1436  : Pair(MD, MD->isDeleted() ? NoMemberOrDeleted : Success) {}
1437 
1438  CXXMethodDecl *getMethod() const { return Pair.getPointer(); }
1439  void setMethod(CXXMethodDecl *MD) { Pair.setPointer(MD); }
1440 
1441  Kind getKind() const { return static_cast<Kind>(Pair.getInt()); }
1442  void setKind(Kind K) { Pair.setInt(K); }
1443  };
1444 
1446  : public llvm::FastFoldingSetNode,
1448  public:
1449  SpecialMemberOverloadResultEntry(const llvm::FoldingSetNodeID &ID)
1450  : FastFoldingSetNode(ID)
1451  {}
1452  };
1453 
1454  /// A cache of special member function overload resolution results
1455  /// for C++ records.
1456  llvm::FoldingSet<SpecialMemberOverloadResultEntry> SpecialMemberCache;
1457 
1458  /// A cache of the flags available in enumerations with the flag_bits
1459  /// attribute.
1460  mutable llvm::DenseMap<const EnumDecl*, llvm::APInt> FlagBitsCache;
1461 
1462  /// The kind of translation unit we are processing.
1463  ///
1464  /// When we're processing a complete translation unit, Sema will perform
1465  /// end-of-translation-unit semantic tasks (such as creating
1466  /// initializers for tentative definitions in C) once parsing has
1467  /// completed. Modules and precompiled headers perform different kinds of
1468  /// checks.
1470 
1471  llvm::BumpPtrAllocator BumpAlloc;
1472 
1473  /// The number of SFINAE diagnostics that have been trapped.
1475 
1476  typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *>>
1478 
1479  /// A mapping from parameters with unparsed default arguments to the
1480  /// set of instantiations of each parameter.
1481  ///
1482  /// This mapping is a temporary data structure used when parsing
1483  /// nested class templates or nested classes of class templates,
1484  /// where we might end up instantiating an inner class before the
1485  /// default arguments of its methods have been parsed.
1487 
1488  // Contains the locations of the beginning of unparsed default
1489  // argument locations.
1490  llvm::DenseMap<ParmVarDecl *, SourceLocation> UnparsedDefaultArgLocs;
1491 
1492  /// UndefinedInternals - all the used, undefined objects which require a
1493  /// definition in this translation unit.
1494  llvm::MapVector<NamedDecl *, SourceLocation> UndefinedButUsed;
1495 
1496  /// Determine if VD, which must be a variable or function, is an external
1497  /// symbol that nonetheless can't be referenced from outside this translation
1498  /// unit because its type has no linkage and it's not extern "C".
1500 
1501  /// Obtain a sorted list of functions that are undefined but ODR-used.
1502  void getUndefinedButUsed(
1503  SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> > &Undefined);
1504 
1505  /// Retrieves list of suspicious delete-expressions that will be checked at
1506  /// the end of translation unit.
1507  const llvm::MapVector<FieldDecl *, DeleteLocs> &
1509 
1511  public:
1512  using Lists = std::pair<ObjCMethodList, ObjCMethodList>;
1513  using iterator = llvm::DenseMap<Selector, Lists>::iterator;
1514  iterator begin() { return Methods.begin(); }
1515  iterator end() { return Methods.end(); }
1516  iterator find(Selector Sel) { return Methods.find(Sel); }
1517  std::pair<iterator, bool> insert(std::pair<Selector, Lists> &&Val) {
1518  return Methods.insert(Val);
1519  }
1520  int count(Selector Sel) const { return Methods.count(Sel); }
1521  bool empty() const { return Methods.empty(); }
1522 
1523  private:
1524  llvm::DenseMap<Selector, Lists> Methods;
1525  };
1526 
1527  /// Method Pool - allows efficient lookup when typechecking messages to "id".
1528  /// We need to maintain a list, since selectors can have differing signatures
1529  /// across classes. In Cocoa, this happens to be extremely uncommon (only 1%
1530  /// of selectors are "overloaded").
1531  /// At the head of the list it is recorded whether there were 0, 1, or >= 2
1532  /// methods inside categories with a particular selector.
1534 
1535  /// Method selectors used in a \@selector expression. Used for implementation
1536  /// of -Wselector.
1537  llvm::MapVector<Selector, SourceLocation> ReferencedSelectors;
1538 
1539  /// List of SourceLocations where 'self' is implicitly retained inside a
1540  /// block.
1543 
1544  /// Kinds of C++ special members.
1553  };
1554 
1555  typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMember>
1557 
1558  /// The C++ special members which we are currently in the process of
1559  /// declaring. If this process recursively triggers the declaration of the
1560  /// same special member, we should act as if it is not yet declared.
1562 
1563  /// Kinds of defaulted comparison operator functions.
1564  enum class DefaultedComparisonKind : unsigned char {
1565  /// This is not a defaultable comparison operator.
1566  None,
1567  /// This is an operator== that should be implemented as a series of
1568  /// subobject comparisons.
1569  Equal,
1570  /// This is an operator<=> that should be implemented as a series of
1571  /// subobject comparisons.
1572  ThreeWay,
1573  /// This is an operator!= that should be implemented as a rewrite in terms
1574  /// of a == comparison.
1575  NotEqual,
1576  /// This is an <, <=, >, or >= that should be implemented as a rewrite in
1577  /// terms of a <=> comparison.
1578  Relational,
1579  };
1580 
1581  /// The function definitions which were renamed as part of typo-correction
1582  /// to match their respective declarations. We want to keep track of them
1583  /// to ensure that we don't emit a "redefinition" error if we encounter a
1584  /// correctly named definition after the renamed definition.
1586 
1587  /// Stack of types that correspond to the parameter entities that are
1588  /// currently being copy-initialized. Can be empty.
1590 
1591  void ReadMethodPool(Selector Sel);
1593 
1594  /// Private Helper predicate to check for 'self'.
1595  bool isSelfExpr(Expr *RExpr);
1596  bool isSelfExpr(Expr *RExpr, const ObjCMethodDecl *Method);
1597 
1598  /// Cause the active diagnostic on the DiagosticsEngine to be
1599  /// emitted. This is closely coupled to the SemaDiagnosticBuilder class and
1600  /// should not be used elsewhere.
1601  void EmitCurrentDiagnostic(unsigned DiagID);
1602 
1603  /// Records and restores the CurFPFeatures state on entry/exit of compound
1604  /// statements.
1606  public:
1609  FPOptionsOverride getOverrides() { return OldOverrides; }
1610 
1611  private:
1612  Sema& S;
1613  FPOptions OldFPFeaturesState;
1614  FPOptionsOverride OldOverrides;
1615  LangOptions::FPEvalMethodKind OldEvalMethod;
1616  SourceLocation OldFPPragmaLocation;
1617  };
1618 
1619  void addImplicitTypedef(StringRef Name, QualType T);
1620 
1621  bool WarnedStackExhausted = false;
1622 
1623  /// Increment when we find a reference; decrement when we find an ignored
1624  /// assignment. Ultimately the value is 0 if every reference is an ignored
1625  /// assignment.
1626  llvm::DenseMap<const VarDecl *, int> RefsMinusAssignments;
1627 
1628  /// Indicate RISC-V vector builtin functions enabled or not.
1630 
1631 private:
1632  std::unique_ptr<sema::RISCVIntrinsicManager> RVIntrinsicManager;
1633 
1634  std::optional<std::unique_ptr<DarwinSDKInfo>> CachedDarwinSDKInfo;
1635 
1636  bool WarnedDarwinSDKInfoMissing = false;
1637 
1638 public:
1639  Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
1641  CodeCompleteConsumer *CompletionConsumer = nullptr);
1642  ~Sema();
1643 
1644  /// Perform initialization that occurs after the parser has been
1645  /// initialized but before it parses anything.
1646  void Initialize();
1647 
1648  /// This virtual key function only exists to limit the emission of debug info
1649  /// describing the Sema class. GCC and Clang only emit debug info for a class
1650  /// with a vtable when the vtable is emitted. Sema is final and not
1651  /// polymorphic, but the debug info size savings are so significant that it is
1652  /// worth adding a vtable just to take advantage of this optimization.
1653  virtual void anchor();
1654 
1655  const LangOptions &getLangOpts() const { return LangOpts; }
1658 
1661  Preprocessor &getPreprocessor() const { return PP; }
1662  ASTContext &getASTContext() const { return Context; }
1663  ASTConsumer &getASTConsumer() const { return Consumer; }
1665  ExternalSemaSource *getExternalSource() const { return ExternalSource.get(); }
1666 
1668  StringRef Platform);
1670 
1671  ///Registers an external source. If an external source already exists,
1672  /// creates a multiplex external source and appends to it.
1673  ///
1674  ///\param[in] E - A non-null external sema source.
1675  ///
1677 
1678  void PrintStats() const;
1679 
1680  /// Warn that the stack is nearly exhausted.
1682 
1683  /// Run some code with "sufficient" stack space. (Currently, at least 256K is
1684  /// guaranteed). Produces a warning if we're low on stack space and allocates
1685  /// more in that case. Use this in code that may recurse deeply (for example,
1686  /// in template instantiation) to avoid stack overflow.
1688  llvm::function_ref<void()> Fn);
1689 
1690  /// Helper class that creates diagnostics with optional
1691  /// template instantiation stacks.
1692  ///
1693  /// This class provides a wrapper around the basic DiagnosticBuilder
1694  /// class that emits diagnostics. ImmediateDiagBuilder is
1695  /// responsible for emitting the diagnostic (as DiagnosticBuilder
1696  /// does) and, if the diagnostic comes from inside a template
1697  /// instantiation, printing the template instantiation stack as
1698  /// well.
1700  Sema &SemaRef;
1701  unsigned DiagID;
1702 
1703  public:
1704  ImmediateDiagBuilder(DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
1705  : DiagnosticBuilder(DB), SemaRef(SemaRef), DiagID(DiagID) {}
1706  ImmediateDiagBuilder(DiagnosticBuilder &&DB, Sema &SemaRef, unsigned DiagID)
1707  : DiagnosticBuilder(DB), SemaRef(SemaRef), DiagID(DiagID) {}
1708 
1709  // This is a cunning lie. DiagnosticBuilder actually performs move
1710  // construction in its copy constructor (but due to varied uses, it's not
1711  // possible to conveniently express this as actual move construction). So
1712  // the default copy ctor here is fine, because the base class disables the
1713  // source anyway, so the user-defined ~ImmediateDiagBuilder is a safe no-op
1714  // in that case anwyay.
1715  ImmediateDiagBuilder(const ImmediateDiagBuilder &) = default;
1716 
1718  // If we aren't active, there is nothing to do.
1719  if (!isActive()) return;
1720 
1721  // Otherwise, we need to emit the diagnostic. First clear the diagnostic
1722  // builder itself so it won't emit the diagnostic in its own destructor.
1723  //
1724  // This seems wasteful, in that as written the DiagnosticBuilder dtor will
1725  // do its own needless checks to see if the diagnostic needs to be
1726  // emitted. However, because we take care to ensure that the builder
1727  // objects never escape, a sufficiently smart compiler will be able to
1728  // eliminate that code.
1729  Clear();
1730 
1731  // Dispatch to Sema to emit the diagnostic.
1732  SemaRef.EmitCurrentDiagnostic(DiagID);
1733  }
1734 
1735  /// Teach operator<< to produce an object of the correct type.
1736  template <typename T>
1737  friend const ImmediateDiagBuilder &
1739  const DiagnosticBuilder &BaseDiag = Diag;
1740  BaseDiag << Value;
1741  return Diag;
1742  }
1743 
1744  // It is necessary to limit this to rvalue reference to avoid calling this
1745  // function with a bitfield lvalue argument since non-const reference to
1746  // bitfield is not allowed.
1747  template <typename T,
1748  typename = std::enable_if_t<!std::is_lvalue_reference<T>::value>>
1749  const ImmediateDiagBuilder &operator<<(T &&V) const {
1750  const DiagnosticBuilder &BaseDiag = *this;
1751  BaseDiag << std::move(V);
1752  return *this;
1753  }
1754  };
1755 
1756  /// A generic diagnostic builder for errors which may or may not be deferred.
1757  ///
1758  /// In CUDA, there exist constructs (e.g. variable-length arrays, try/catch)
1759  /// which are not allowed to appear inside __device__ functions and are
1760  /// allowed to appear in __host__ __device__ functions only if the host+device
1761  /// function is never codegen'ed.
1762  ///
1763  /// To handle this, we use the notion of "deferred diagnostics", where we
1764  /// attach a diagnostic to a FunctionDecl that's emitted iff it's codegen'ed.
1765  ///
1766  /// This class lets you emit either a regular diagnostic, a deferred
1767  /// diagnostic, or no diagnostic at all, according to an argument you pass to
1768  /// its constructor, thus simplifying the process of creating these "maybe
1769  /// deferred" diagnostics.
1771  public:
1772  enum Kind {
1773  /// Emit no diagnostics.
1775  /// Emit the diagnostic immediately (i.e., behave like Sema::Diag()).
1777  /// Emit the diagnostic immediately, and, if it's a warning or error, also
1778  /// emit a call stack showing how this function can be reached by an a
1779  /// priori known-emitted function.
1781  /// Create a deferred diagnostic, which is emitted only if the function
1782  /// it's attached to is codegen'ed. Also emit a call stack as with
1783  /// K_ImmediateWithCallStack.
1785  };
1786 
1787  SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID,
1788  FunctionDecl *Fn, Sema &S);
1790  SemaDiagnosticBuilder(const SemaDiagnosticBuilder &) = default;
1792 
1793  bool isImmediate() const { return ImmediateDiag.has_value(); }
1794 
1795  /// Convertible to bool: True if we immediately emitted an error, false if
1796  /// we didn't emit an error or we created a deferred error.
1797  ///
1798  /// Example usage:
1799  ///
1800  /// if (SemaDiagnosticBuilder(...) << foo << bar)
1801  /// return ExprError();
1802  ///
1803  /// But see CUDADiagIfDeviceCode() and CUDADiagIfHostCode() -- you probably
1804  /// want to use these instead of creating a SemaDiagnosticBuilder yourself.
1805  operator bool() const { return isImmediate(); }
1806 
1807  template <typename T>
1808  friend const SemaDiagnosticBuilder &
1810  if (Diag.ImmediateDiag)
1811  *Diag.ImmediateDiag << Value;
1812  else if (Diag.PartialDiagId)
1813  Diag.S.DeviceDeferredDiags[Diag.Fn][*Diag.PartialDiagId].second
1814  << Value;
1815  return Diag;
1816  }
1817 
1818  // It is necessary to limit this to rvalue reference to avoid calling this
1819  // function with a bitfield lvalue argument since non-const reference to
1820  // bitfield is not allowed.
1821  template <typename T,
1822  typename = std::enable_if_t<!std::is_lvalue_reference<T>::value>>
1823  const SemaDiagnosticBuilder &operator<<(T &&V) const {
1824  if (ImmediateDiag)
1825  *ImmediateDiag << std::move(V);
1826  else if (PartialDiagId)
1827  S.DeviceDeferredDiags[Fn][*PartialDiagId].second << std::move(V);
1828  return *this;
1829  }
1830 
1831  friend const SemaDiagnosticBuilder &
1833  if (Diag.ImmediateDiag)
1834  PD.Emit(*Diag.ImmediateDiag);
1835  else if (Diag.PartialDiagId)
1836  Diag.S.DeviceDeferredDiags[Diag.Fn][*Diag.PartialDiagId].second = PD;
1837  return Diag;
1838  }
1839 
1840  void AddFixItHint(const FixItHint &Hint) const {
1841  if (ImmediateDiag)
1842  ImmediateDiag->AddFixItHint(Hint);
1843  else if (PartialDiagId)
1844  S.DeviceDeferredDiags[Fn][*PartialDiagId].second.AddFixItHint(Hint);
1845  }
1846 
1848  return ExprError();
1849  }
1851  return StmtError();
1852  }
1853  operator ExprResult() const { return ExprError(); }
1854  operator StmtResult() const { return StmtError(); }
1855  operator TypeResult() const { return TypeError(); }
1856  operator DeclResult() const { return DeclResult(true); }
1857  operator MemInitResult() const { return MemInitResult(true); }
1858 
1859  private:
1860  Sema &S;
1861  SourceLocation Loc;
1862  unsigned DiagID;
1863  FunctionDecl *Fn;
1864  bool ShowCallStack;
1865 
1866  // Invariant: At most one of these Optionals has a value.
1867  // FIXME: Switch these to a Variant once that exists.
1868  std::optional<ImmediateDiagBuilder> ImmediateDiag;
1869  std::optional<unsigned> PartialDiagId;
1870  };
1871 
1872  /// Is the last error level diagnostic immediate. This is used to determined
1873  /// whether the next info diagnostic should be immediate.
1875 
1876  /// Emit a diagnostic.
1877  SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID,
1878  bool DeferHint = false);
1879 
1880  /// Emit a partial diagnostic.
1882  bool DeferHint = false);
1883 
1884  /// Build a partial diagnostic.
1885  PartialDiagnostic PDiag(unsigned DiagID = 0); // in SemaInternal.h
1886 
1887  /// Whether deferrable diagnostics should be deferred.
1888  bool DeferDiags = false;
1889 
1890  /// RAII class to control scope of DeferDiags.
1892  Sema &S;
1893  bool SavedDeferDiags = false;
1894 
1895  public:
1897  : S(S), SavedDeferDiags(S.DeferDiags) {
1898  S.DeferDiags = DeferDiags;
1899  }
1900  ~DeferDiagsRAII() { S.DeferDiags = SavedDeferDiags; }
1901  };
1902 
1903  /// Whether uncompilable error has occurred. This includes error happens
1904  /// in deferred diagnostics.
1905  bool hasUncompilableErrorOccurred() const;
1906 
1907  bool findMacroSpelling(SourceLocation &loc, StringRef name);
1908 
1909  /// Get a string to suggest for zero-initialization of a type.
1910  std::string
1913 
1914  /// Calls \c Lexer::getLocForEndOfToken()
1916 
1917  /// Retrieve the module loader associated with the preprocessor.
1918  ModuleLoader &getModuleLoader() const;
1919 
1920  /// Invent a new identifier for parameters of abbreviated templates.
1921  IdentifierInfo *
1923  unsigned Index);
1924 
1926 
1927  private:
1928  /// Function or variable declarations to be checked for whether the deferred
1929  /// diagnostics should be emitted.
1930  llvm::SmallSetVector<Decl *, 4> DeclsToCheckForDeferredDiags;
1931 
1932  public:
1933  // Emit all deferred diagnostics.
1934  void emitDeferredDiags();
1935 
1937  /// The global module fragment, between 'module;' and a module-declaration.
1939  /// A normal translation unit fragment. For a non-module unit, this is the
1940  /// entire translation unit. Otherwise, it runs from the module-declaration
1941  /// to the private-module-fragment (if any) or the end of the TU (if not).
1943  /// The private module fragment, between 'module :private;' and the end of
1944  /// the translation unit.
1946  };
1947 
1951 
1953 
1955 
1956  void PushFunctionScope();
1957  void PushBlockScope(Scope *BlockScope, BlockDecl *Block);
1959 
1960  /// This is used to inform Sema what the current TemplateParameterDepth
1961  /// is during Parsing. Currently it is used to pass on the depth
1962  /// when parsing generic lambda 'auto' parameters.
1964 
1965  void PushCapturedRegionScope(Scope *RegionScope, CapturedDecl *CD,
1967  unsigned OpenMPCaptureLevel = 0);
1968 
1969  /// Custom deleter to allow FunctionScopeInfos to be kept alive for a short
1970  /// time after they've been popped.
1972  Sema *Self;
1973 
1974  public:
1975  explicit PoppedFunctionScopeDeleter(Sema *Self) : Self(Self) {}
1977  };
1978 
1979  using PoppedFunctionScopePtr =
1980  std::unique_ptr<sema::FunctionScopeInfo, PoppedFunctionScopeDeleter>;
1981 
1984  const Decl *D = nullptr,
1985  QualType BlockType = QualType());
1986 
1988  return FunctionScopes.empty() ? nullptr : FunctionScopes.back();
1989  }
1990 
1992 
1996  void setFunctionHasMustTail();
1997 
1998  void PushCompoundScope(bool IsStmtExpr);
1999  void PopCompoundScope();
2000 
2002 
2004 
2005  /// Retrieve the current block, if any.
2007 
2008  /// Get the innermost lambda enclosing the current location, if any. This
2009  /// looks through intervening non-lambda scopes such as local functions and
2010  /// blocks.
2012 
2013  /// Retrieve the current lambda scope info, if any.
2014  /// \param IgnoreNonLambdaCapturingScope true if should find the top-most
2015  /// lambda scope info ignoring all inner capturing scopes that are not
2016  /// lambda scopes.
2018  getCurLambda(bool IgnoreNonLambdaCapturingScope = false);
2019 
2020  /// Retrieve the current generic lambda info, if any.
2022 
2023  /// Retrieve the current captured region, if any.
2025 
2026  /// Retrieve the current function, if any, that should be analyzed for
2027  /// potential availability violations.
2029 
2030  /// WeakTopLevelDeclDecls - access to \#pragma weak-generated Decls
2032 
2033  /// Called before parsing a function declarator belonging to a function
2034  /// declaration.
2036  unsigned TemplateParameterDepth);
2037 
2038  /// Called after parsing a function declarator belonging to a function
2039  /// declaration.
2041 
2042  void ActOnComment(SourceRange Comment);
2043 
2044  //===--------------------------------------------------------------------===//
2045  // Type Analysis / Processing: SemaType.cpp.
2046  //
2047 
2049  const DeclSpec *DS = nullptr);
2050  QualType BuildQualifiedType(QualType T, SourceLocation Loc, unsigned CVRA,
2051  const DeclSpec *DS = nullptr);
2053  SourceLocation Loc, DeclarationName Entity);
2054  QualType BuildReferenceType(QualType T, bool LValueRef,
2055  SourceLocation Loc, DeclarationName Entity);
2057  Expr *ArraySize, unsigned Quals,
2058  SourceRange Brackets, DeclarationName Entity);
2059  QualType BuildVectorType(QualType T, Expr *VecSize, SourceLocation AttrLoc);
2060  QualType BuildExtVectorType(QualType T, Expr *ArraySize,
2061  SourceLocation AttrLoc);
2062  QualType BuildMatrixType(QualType T, Expr *NumRows, Expr *NumColumns,
2063  SourceLocation AttrLoc);
2064 
2065  QualType BuildAddressSpaceAttr(QualType &T, LangAS ASIdx, Expr *AddrSpace,
2066  SourceLocation AttrLoc);
2067 
2068  /// Same as above, but constructs the AddressSpace index if not provided.
2070  SourceLocation AttrLoc);
2071 
2073 
2075 
2076  /// Build a function type.
2077  ///
2078  /// This routine checks the function type according to C++ rules and
2079  /// under the assumption that the result type and parameter types have
2080  /// just been instantiated from a template. It therefore duplicates
2081  /// some of the behavior of GetTypeForDeclarator, but in a much
2082  /// simpler form that is only suitable for this narrow use case.
2083  ///
2084  /// \param T The return type of the function.
2085  ///
2086  /// \param ParamTypes The parameter types of the function. This array
2087  /// will be modified to account for adjustments to the types of the
2088  /// function parameters.
2089  ///
2090  /// \param Loc The location of the entity whose type involves this
2091  /// function type or, if there is no such entity, the location of the
2092  /// type that will have function type.
2093  ///
2094  /// \param Entity The name of the entity that involves the function
2095  /// type, if known.
2096  ///
2097  /// \param EPI Extra information about the function type. Usually this will
2098  /// be taken from an existing function with the same prototype.
2099  ///
2100  /// \returns A suitable function type, if there are no errors. The
2101  /// unqualified type will always be a FunctionProtoType.
2102  /// Otherwise, returns a NULL type.
2104  MutableArrayRef<QualType> ParamTypes,
2105  SourceLocation Loc, DeclarationName Entity,
2106  const FunctionProtoType::ExtProtoInfo &EPI);
2107 
2109  SourceLocation Loc,
2110  DeclarationName Entity);
2112  SourceLocation Loc, DeclarationName Entity);
2116  SourceLocation Loc);
2118  SourceLocation Loc);
2119  QualType BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc);
2120 
2123 
2124  /// Package the given type and TSI into a ParsedType.
2129  TypeSourceInfo **TInfo = nullptr);
2130  CanThrowResult canThrow(const Stmt *E);
2131  /// Determine whether the callee of a particular function call can throw.
2132  /// E, D and Loc are all optional.
2133  static CanThrowResult canCalleeThrow(Sema &S, const Expr *E, const Decl *D,
2134  SourceLocation Loc = SourceLocation());
2136  const FunctionProtoType *FPT);
2143  const FunctionProtoType *Old, SourceLocation OldLoc,
2144  const FunctionProtoType *New, SourceLocation NewLoc);
2146  const PartialDiagnostic &DiagID, const PartialDiagnostic & NoteID,
2147  const FunctionProtoType *Old, SourceLocation OldLoc,
2148  const FunctionProtoType *New, SourceLocation NewLoc);
2149  bool handlerCanCatch(QualType HandlerType, QualType ExceptionType);
2150  bool CheckExceptionSpecSubset(const PartialDiagnostic &DiagID,
2151  const PartialDiagnostic &NestedDiagID,
2152  const PartialDiagnostic &NoteID,
2153  const PartialDiagnostic &NoThrowDiagID,
2154  const FunctionProtoType *Superset,
2155  SourceLocation SuperLoc,
2156  const FunctionProtoType *Subset,
2157  SourceLocation SubLoc);
2158  bool CheckParamExceptionSpec(const PartialDiagnostic &NestedDiagID,
2159  const PartialDiagnostic &NoteID,
2160  const FunctionProtoType *Target,
2161  SourceLocation TargetLoc,
2162  const FunctionProtoType *Source,
2163  SourceLocation SourceLoc);
2164 
2166 
2167  /// The parser has parsed the context-sensitive type 'instancetype'
2168  /// in an Objective-C message declaration. Return the appropriate type.
2170 
2171  /// Abstract class used to diagnose incomplete types.
2172  struct TypeDiagnoser {
2174 
2175  virtual void diagnose(Sema &S, SourceLocation Loc, QualType T) = 0;
2176  virtual ~TypeDiagnoser() {}
2177  };
2178 
2179  static int getPrintable(int I) { return I; }
2180  static unsigned getPrintable(unsigned I) { return I; }
2181  static bool getPrintable(bool B) { return B; }
2182  static const char * getPrintable(const char *S) { return S; }
2183  static StringRef getPrintable(StringRef S) { return S; }
2184  static const std::string &getPrintable(const std::string &S) { return S; }
2185  static const IdentifierInfo *getPrintable(const IdentifierInfo *II) {
2186  return II;
2187  }
2189  static QualType getPrintable(QualType T) { return T; }
2190  static SourceRange getPrintable(SourceRange R) { return R; }
2191  static SourceRange getPrintable(SourceLocation L) { return L; }
2192  static SourceRange getPrintable(const Expr *E) { return E->getSourceRange(); }
2193  static SourceRange getPrintable(TypeLoc TL) { return TL.getSourceRange();}
2194 
2195  template <typename... Ts> class BoundTypeDiagnoser : public TypeDiagnoser {
2196  protected:
2197  unsigned DiagID;
2198  std::tuple<const Ts &...> Args;
2199 
2200  template <std::size_t... Is>
2201  void emit(const SemaDiagnosticBuilder &DB,
2202  std::index_sequence<Is...>) const {
2203  // Apply all tuple elements to the builder in order.
2204  bool Dummy[] = {false, (DB << getPrintable(std::get<Is>(Args)))...};
2205  (void)Dummy;
2206  }
2207 
2208  public:
2209  BoundTypeDiagnoser(unsigned DiagID, const Ts &...Args)
2210  : TypeDiagnoser(), DiagID(DiagID), Args(Args...) {
2211  assert(DiagID != 0 && "no diagnostic for type diagnoser");
2212  }
2213 
2214  void diagnose(Sema &S, SourceLocation Loc, QualType T) override {
2215  const SemaDiagnosticBuilder &DB = S.Diag(Loc, DiagID);
2216  emit(DB, std::index_sequence_for<Ts...>());
2217  DB << T;
2218  }
2219  };
2220 
2221  /// Do a check to make sure \p Name looks like a legal argument for the
2222  /// swift_name attribute applied to decl \p D. Raise a diagnostic if the name
2223  /// is invalid for the given declaration.
2224  ///
2225  /// \p AL is used to provide caret diagnostics in case of a malformed name.
2226  ///
2227  /// \returns true if the name is a valid swift name for \p D, false otherwise.
2228  bool DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc,
2229  const ParsedAttr &AL, bool IsAsync);
2230 
2231  /// A derivative of BoundTypeDiagnoser for which the diagnostic's type
2232  /// parameter is preceded by a 0/1 enum that is 1 if the type is sizeless.
2233  /// For example, a diagnostic with no other parameters would generally have
2234  /// the form "...%select{incomplete|sizeless}0 type %1...".
2235  template <typename... Ts>
2237  public:
2238  SizelessTypeDiagnoser(unsigned DiagID, const Ts &... Args)
2239  : BoundTypeDiagnoser<Ts...>(DiagID, Args...) {}
2240 
2241  void diagnose(Sema &S, SourceLocation Loc, QualType T) override {
2242  const SemaDiagnosticBuilder &DB = S.Diag(Loc, this->DiagID);
2243  this->emit(DB, std::index_sequence_for<Ts...>());
2244  DB << T->isSizelessType() << T;
2245  }
2246  };
2247 
2248  enum class CompleteTypeKind {
2249  /// Apply the normal rules for complete types. In particular,
2250  /// treat all sizeless types as incomplete.
2251  Normal,
2252 
2253  /// Relax the normal rules for complete types so that they include
2254  /// sizeless built-in types.
2256 
2257  // FIXME: Eventually we should flip the default to Normal and opt in
2258  // to AcceptSizeless rather than opt out of it.
2260  };
2261 
2263 
2264 private:
2265  /// Methods for marking which expressions involve dereferencing a pointer
2266  /// marked with the 'noderef' attribute. Expressions are checked bottom up as
2267  /// they are parsed, meaning that a noderef pointer may not be accessed. For
2268  /// example, in `&*p` where `p` is a noderef pointer, we will first parse the
2269  /// `*p`, but need to check that `address of` is called on it. This requires
2270  /// keeping a container of all pending expressions and checking if the address
2271  /// of them are eventually taken.
2272  void CheckSubscriptAccessOfNoDeref(const ArraySubscriptExpr *E);
2273  void CheckAddressOfNoDeref(const Expr *E);
2274  void CheckMemberAccessOfNoDeref(const MemberExpr *E);
2275 
2276  bool RequireCompleteTypeImpl(SourceLocation Loc, QualType T,
2277  CompleteTypeKind Kind, TypeDiagnoser *Diagnoser);
2278 
2279  struct ModuleScope {
2280  SourceLocation BeginLoc;
2281  clang::Module *Module = nullptr;
2282  bool ModuleInterface = false;
2283  VisibleModuleSet OuterVisibleModules;
2284  };
2285  /// The modules we're currently parsing.
2287  /// The global module fragment of the current translation unit.
2288  clang::Module *GlobalModuleFragment = nullptr;
2289 
2290  /// The modules we imported directly.
2291  llvm::SmallPtrSet<clang::Module *, 8> DirectModuleImports;
2292 
2293  /// Namespace definitions that we will export when they finish.
2294  llvm::SmallPtrSet<const NamespaceDecl*, 8> DeferredExportedNamespaces;
2295 
2296  /// In a C++ standard module, inline declarations require a definition to be
2297  /// present at the end of a definition domain. This set holds the decls to
2298  /// be checked at the end of the TU.
2299  llvm::SmallPtrSet<const FunctionDecl *, 8> PendingInlineFuncDecls;
2300 
2301  /// Helper function to judge if we are in module purview.
2302  /// Return false if we are not in a module.
2303  bool isCurrentModulePurview() const {
2304  return getCurrentModule() ? getCurrentModule()->isModulePurview() : false;
2305  }
2306 
2307  /// Enter the scope of the global module.
2308  Module *PushGlobalModuleFragment(SourceLocation BeginLoc, bool IsImplicit);
2309  /// Leave the scope of the global module.
2310  void PopGlobalModuleFragment();
2311 
2312  VisibleModuleSet VisibleModules;
2313 
2314  /// Cache for module units which is usable for current module.
2315  llvm::DenseSet<const Module *> UsableModuleUnitsCache;
2316 
2317  bool isUsableModule(const Module *M);
2318 
2319  bool isAcceptableSlow(const NamedDecl *D, AcceptableKind Kind);
2320 
2321 public:
2322  /// Get the module unit whose scope we are currently within.
2324  return ModuleScopes.empty() ? nullptr : ModuleScopes.back().Module;
2325  }
2326 
2327  /// Is the module scope we are an interface?
2329  return ModuleScopes.empty() ? false : ModuleScopes.back().ModuleInterface;
2330  }
2331 
2332  /// Is the module scope we are in a C++ Header Unit?
2334  return ModuleScopes.empty() ? false
2335  : ModuleScopes.back().Module->isHeaderUnit();
2336  }
2337 
2338  /// Get the module owning an entity.
2339  Module *getOwningModule(const Decl *Entity) {
2340  return Entity->getOwningModule();
2341  }
2342 
2344  return DirectModuleImports.contains(M);
2345  }
2346 
2347  // Determine whether the module M belongs to the current TU.
2348  bool isModuleUnitOfCurrentTU(const Module *M) const;
2349 
2350  /// Make a merged definition of an existing hidden definition \p ND
2351  /// visible at the specified location.
2353 
2354  bool isModuleVisible(const Module *M, bool ModulePrivate = false);
2355 
2356  // When loading a non-modular PCH files, this is used to restore module
2357  // visibility.
2358  void makeModuleVisible(Module *Mod, SourceLocation ImportLoc) {
2359  VisibleModules.setVisible(Mod, ImportLoc);
2360  }
2361 
2362  /// Determine whether a declaration is visible to name lookup.
2363  bool isVisible(const NamedDecl *D) {
2364  return D->isUnconditionallyVisible() ||
2365  isAcceptableSlow(D, AcceptableKind::Visible);
2366  }
2367 
2368  /// Determine whether a declaration is reachable.
2369  bool isReachable(const NamedDecl *D) {
2370  // All visible declarations are reachable.
2371  return D->isUnconditionallyVisible() ||
2372  isAcceptableSlow(D, AcceptableKind::Reachable);
2373  }
2374 
2375  /// Determine whether a declaration is acceptable (visible/reachable).
2377  return Kind == AcceptableKind::Visible ? isVisible(D) : isReachable(D);
2378  }
2379 
2380  /// Determine whether any declaration of an entity is visible.
2381  bool
2383  llvm::SmallVectorImpl<Module *> *Modules = nullptr) {
2384  return isVisible(D) || hasVisibleDeclarationSlow(D, Modules);
2385  }
2386 
2387  bool hasVisibleDeclarationSlow(const NamedDecl *D,
2389  /// Determine whether any declaration of an entity is reachable.
2390  bool
2392  llvm::SmallVectorImpl<Module *> *Modules = nullptr) {
2393  return isReachable(D) || hasReachableDeclarationSlow(D, Modules);
2394  }
2396  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2397 
2400 
2401  /// Determine if \p D and \p Suggested have a structurally compatible
2402  /// layout as described in C11 6.2.7/1.
2403  bool hasStructuralCompatLayout(Decl *D, Decl *Suggested);
2404 
2405  /// Determine if \p D has a visible definition. If not, suggest a declaration
2406  /// that should be made visible to expose the definition.
2407  bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
2408  bool OnlyNeedComplete = false);
2410  NamedDecl *Hidden;
2411  return hasVisibleDefinition(const_cast<NamedDecl*>(D), &Hidden);
2412  }
2413 
2414  /// Determine if \p D has a reachable definition. If not, suggest a
2415  /// declaration that should be made reachable to expose the definition.
2416  bool hasReachableDefinition(NamedDecl *D, NamedDecl **Suggested,
2417  bool OnlyNeedComplete = false);
2419  NamedDecl *Hidden;
2420  return hasReachableDefinition(D, &Hidden);
2421  }
2422 
2423  bool hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested,
2425  bool OnlyNeedComplete = false);
2427  NamedDecl *Hidden;
2428  return hasAcceptableDefinition(D, &Hidden, Kind);
2429  }
2430 
2431  /// Determine if the template parameter \p D has a visible default argument.
2432  bool
2434  llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2435  /// Determine if the template parameter \p D has a reachable default argument.
2437  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2438  /// Determine if the template parameter \p D has a reachable default argument.
2442 
2443  /// Determine if there is a visible declaration of \p D that is an explicit
2444  /// specialization declaration for a specialization of a template. (For a
2445  /// member specialization, use hasVisibleMemberSpecialization.)
2447  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2448  /// Determine if there is a reachable declaration of \p D that is an explicit
2449  /// specialization declaration for a specialization of a template. (For a
2450  /// member specialization, use hasReachableMemberSpecialization.)
2452  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2453 
2454  /// Determine if there is a visible declaration of \p D that is a member
2455  /// specialization declaration (as opposed to an instantiated declaration).
2457  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2458  /// Determine if there is a reachable declaration of \p D that is a member
2459  /// specialization declaration (as opposed to an instantiated declaration).
2461  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2462 
2463  /// Determine if \p A and \p B are equivalent internal linkage declarations
2464  /// from different modules, and thus an ambiguity error can be downgraded to
2465  /// an extension warning.
2467  const NamedDecl *B);
2469  SourceLocation Loc, const NamedDecl *D,
2471 
2473 
2474  // Check whether the size of array element of type \p EltTy is a multiple of
2475  // its alignment and return false if it isn't.
2477 
2480  return !RequireCompleteTypeImpl(Loc, T, Kind, nullptr);
2481  }
2483  CompleteTypeKind Kind, TypeDiagnoser &Diagnoser);
2485  CompleteTypeKind Kind, unsigned DiagID);
2486 
2488  TypeDiagnoser &Diagnoser) {
2489  return RequireCompleteType(Loc, T, CompleteTypeKind::Default, Diagnoser);
2490  }
2491  bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID) {
2492  return RequireCompleteType(Loc, T, CompleteTypeKind::Default, DiagID);
2493  }
2494 
2495  template <typename... Ts>
2496  bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID,
2497  const Ts &...Args) {
2498  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2499  return RequireCompleteType(Loc, T, Diagnoser);
2500  }
2501 
2502  template <typename... Ts>
2503  bool RequireCompleteSizedType(SourceLocation Loc, QualType T, unsigned DiagID,
2504  const Ts &... Args) {
2505  SizelessTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2506  return RequireCompleteType(Loc, T, CompleteTypeKind::Normal, Diagnoser);
2507  }
2508 
2509  /// Get the type of expression E, triggering instantiation to complete the
2510  /// type if necessary -- that is, if the expression refers to a templated
2511  /// static data member of incomplete array type.
2512  ///
2513  /// May still return an incomplete type if instantiation was not possible or
2514  /// if the type is incomplete for a different reason. Use
2515  /// RequireCompleteExprType instead if a diagnostic is expected for an
2516  /// incomplete expression type.
2518 
2519  void completeExprArrayBound(Expr *E);
2521  TypeDiagnoser &Diagnoser);
2522  bool RequireCompleteExprType(Expr *E, unsigned DiagID);
2523 
2524  template <typename... Ts>
2525  bool RequireCompleteExprType(Expr *E, unsigned DiagID, const Ts &...Args) {
2526  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2527  return RequireCompleteExprType(E, CompleteTypeKind::Default, Diagnoser);
2528  }
2529 
2530  template <typename... Ts>
2531  bool RequireCompleteSizedExprType(Expr *E, unsigned DiagID,
2532  const Ts &... Args) {
2533  SizelessTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2534  return RequireCompleteExprType(E, CompleteTypeKind::Normal, Diagnoser);
2535  }
2536 
2538  TypeDiagnoser &Diagnoser);
2539  bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID);
2540 
2541  template <typename... Ts>
2542  bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID,
2543  const Ts &...Args) {
2544  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2545  return RequireLiteralType(Loc, T, Diagnoser);
2546  }
2547 
2549  const CXXScopeSpec &SS, QualType T,
2550  TagDecl *OwnedTagDecl = nullptr);
2551 
2552  // Returns the underlying type of a decltype with the given expression.
2554 
2556  /// If AsUnevaluated is false, E is treated as though it were an evaluated
2557  /// context, such as when building a type for decltype(auto).
2558  QualType BuildDecltypeType(Expr *E, bool AsUnevaluated = true);
2559 
2562  SourceLocation Loc);
2567  QualType BuiltinAddReference(QualType BaseType, UTTKind UKind,
2568  SourceLocation Loc);
2569  QualType BuiltinRemoveExtent(QualType BaseType, UTTKind UKind,
2570  SourceLocation Loc);
2572  SourceLocation Loc);
2574  SourceLocation Loc);
2576  SourceLocation Loc);
2577 
2578  //===--------------------------------------------------------------------===//
2579  // Symbol table / Decl tracking callbacks: SemaDecl.cpp.
2580  //
2581 
2582  struct SkipBodyInfo {
2585  New(nullptr) {}
2590  };
2591 
2592  DeclGroupPtrTy ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType = nullptr);
2593 
2595 
2597 
2599  Scope *S, CXXScopeSpec *SS = nullptr,
2600  bool isClassName = false, bool HasTrailingDot = false,
2601  ParsedType ObjectType = nullptr,
2602  bool IsCtorOrDtorName = false,
2603  bool WantNontrivialTypeSourceInfo = false,
2604  bool IsClassTemplateDeductionContext = true,
2605  ImplicitTypenameContext AllowImplicitTypename =
2607  IdentifierInfo **CorrectedII = nullptr);
2609  bool isMicrosoftMissingTypename(const CXXScopeSpec *SS, Scope *S);
2611  SourceLocation IILoc,
2612  Scope *S,
2613  CXXScopeSpec *SS,
2614  ParsedType &SuggestedType,
2615  bool IsTemplateName = false);
2616 
2617  /// Attempt to behave like MSVC in situations where lookup of an unqualified
2618  /// type name has failed in a dependent context. In these situations, we
2619  /// automatically form a DependentTypeName that will retry lookup in a related
2620  /// scope during instantiation.
2622  SourceLocation NameLoc,
2623  bool IsTemplateTypeArg);
2624 
2625  /// Describes the result of the name lookup and resolution performed
2626  /// by \c ClassifyName().
2628  /// This name is not a type or template in this context, but might be
2629  /// something else.
2631  /// Classification failed; an error has been produced.
2633  /// The name has been typo-corrected to a keyword.
2635  /// The name was classified as a type.
2637  /// The name was classified as a specific non-type, non-template
2638  /// declaration. ActOnNameClassifiedAsNonType should be called to
2639  /// convert the declaration to an expression.
2641  /// The name was classified as an ADL-only function name.
2642  /// ActOnNameClassifiedAsUndeclaredNonType should be called to convert the
2643  /// result to an expression.
2645  /// The name denotes a member of a dependent type that could not be
2646  /// resolved. ActOnNameClassifiedAsDependentNonType should be called to
2647  /// convert the result to an expression.
2649  /// The name was classified as an overload set, and an expression
2650  /// representing that overload set has been formed.
2651  /// ActOnNameClassifiedAsOverloadSet should be called to form a suitable
2652  /// expression referencing the overload set.
2654  /// The name was classified as a template whose specializations are types.
2656  /// The name was classified as a variable template name.
2658  /// The name was classified as a function template name.
2660  /// The name was classified as an ADL-only function template name.
2662  /// The name was classified as a concept name.
2664  };
2665 
2668  union {
2673  };
2674 
2675  explicit NameClassification(NameClassificationKind Kind) : Kind(Kind) {}
2676 
2677  public:
2679 
2680  NameClassification(const IdentifierInfo *Keyword) : Kind(NC_Keyword) {}
2681 
2683  return NameClassification(NC_Error);
2684  }
2685 
2688  }
2689 
2692  Result.Expr = E;
2693  return Result;
2694  }
2695 
2698  Result.NonTypeDecl = D;
2699  return Result;
2700  }
2701 
2704  }
2705 
2708  }
2709 
2712  Result.Template = Name;
2713  return Result;
2714  }
2715 
2718  Result.Template = Name;
2719  return Result;
2720  }
2721 
2724  Result.Template = Name;
2725  return Result;
2726  }
2727 
2730  Result.Template = Name;
2731  return Result;
2732  }
2733 
2736  Result.Template = Name;
2737  return Result;
2738  }
2739 
2740  NameClassificationKind getKind() const { return Kind; }
2741 
2743  assert(Kind == NC_OverloadSet);
2744  return Expr;
2745  }
2746 
2748  assert(Kind == NC_Type);
2749  return Type;
2750  }
2751 
2753  assert(Kind == NC_NonType);
2754  return NonTypeDecl;
2755  }
2756 
2758  assert(Kind == NC_TypeTemplate || Kind == NC_FunctionTemplate ||
2759  Kind == NC_VarTemplate || Kind == NC_Concept ||
2760  Kind == NC_UndeclaredTemplate);
2761  return Template;
2762  }
2763 
2765  switch (Kind) {
2766  case NC_TypeTemplate:
2767  return TNK_Type_template;
2768  case NC_FunctionTemplate:
2769  return TNK_Function_template;
2770  case NC_VarTemplate:
2771  return TNK_Var_template;
2772  case NC_Concept:
2773  return TNK_Concept_template;
2774  case NC_UndeclaredTemplate:
2775  return TNK_Undeclared_template;
2776  default:
2777  llvm_unreachable("unsupported name classification.");
2778  }
2779  }
2780  };
2781 
2782  /// Perform name lookup on the given name, classifying it based on
2783  /// the results of name lookup and the following token.
2784  ///
2785  /// This routine is used by the parser to resolve identifiers and help direct
2786  /// parsing. When the identifier cannot be found, this routine will attempt
2787  /// to correct the typo and classify based on the resulting name.
2788  ///
2789  /// \param S The scope in which we're performing name lookup.
2790  ///
2791  /// \param SS The nested-name-specifier that precedes the name.
2792  ///
2793  /// \param Name The identifier. If typo correction finds an alternative name,
2794  /// this pointer parameter will be updated accordingly.
2795  ///
2796  /// \param NameLoc The location of the identifier.
2797  ///
2798  /// \param NextToken The token following the identifier. Used to help
2799  /// disambiguate the name.
2800  ///
2801  /// \param CCC The correction callback, if typo correction is desired.
2802  NameClassification ClassifyName(Scope *S, CXXScopeSpec &SS,
2803  IdentifierInfo *&Name, SourceLocation NameLoc,
2804  const Token &NextToken,
2805  CorrectionCandidateCallback *CCC = nullptr);
2806 
2807  /// Act on the result of classifying a name as an undeclared (ADL-only)
2808  /// non-type declaration.
2810  SourceLocation NameLoc);
2811  /// Act on the result of classifying a name as an undeclared member of a
2812  /// dependent base class.
2814  IdentifierInfo *Name,
2815  SourceLocation NameLoc,
2816  bool IsAddressOfOperand);
2817  /// Act on the result of classifying a name as a specific non-type
2818  /// declaration.
2820  NamedDecl *Found,
2821  SourceLocation NameLoc,
2822  const Token &NextToken);
2823  /// Act on the result of classifying a name as an overload set.
2825 
2826  /// Describes the detailed kind of a template name. Used in diagnostics.
2828  ClassTemplate,
2830  VarTemplate,
2831  AliasTemplate,
2833  Concept,
2835  };
2838 
2839  /// Determine whether it's plausible that E was intended to be a
2840  /// template-name.
2841  bool mightBeIntendedToBeTemplateName(ExprResult E, bool &Dependent) {
2842  if (!getLangOpts().CPlusPlus || E.isInvalid())
2843  return false;
2844  Dependent = false;
2845  if (auto *DRE = dyn_cast<DeclRefExpr>(E.get()))
2846  return !DRE->hasExplicitTemplateArgs();
2847  if (auto *ME = dyn_cast<MemberExpr>(E.get()))
2848  return !ME->hasExplicitTemplateArgs();
2849  Dependent = true;
2850  if (auto *DSDRE = dyn_cast<DependentScopeDeclRefExpr>(E.get()))
2851  return !DSDRE->hasExplicitTemplateArgs();
2852  if (auto *DSME = dyn_cast<CXXDependentScopeMemberExpr>(E.get()))
2853  return !DSME->hasExplicitTemplateArgs();
2854  // Any additional cases recognized here should also be handled by
2855  // diagnoseExprIntendedAsTemplateName.
2856  return false;
2857  }
2859  SourceLocation Less,
2860  SourceLocation Greater);
2861 
2862  void warnOnReservedIdentifier(const NamedDecl *D);
2863 
2865 
2867  MultiTemplateParamsArg TemplateParameterLists);
2869  QualType &T, SourceLocation Loc,
2870  unsigned FailedFoldDiagID);
2874  DeclarationName Name, SourceLocation Loc,
2875  bool IsTemplateId);
2876  void
2877  diagnoseIgnoredQualifiers(unsigned DiagID, unsigned Quals,
2878  SourceLocation FallbackLoc,
2879  SourceLocation ConstQualLoc = SourceLocation(),
2880  SourceLocation VolatileQualLoc = SourceLocation(),
2881  SourceLocation RestrictQualLoc = SourceLocation(),
2882  SourceLocation AtomicQualLoc = SourceLocation(),
2883  SourceLocation UnalignedQualLoc = SourceLocation());
2884 
2885  static bool adjustContextForLocalExternDecl(DeclContext *&DC);
2886  void DiagnoseFunctionSpecifiers(const DeclSpec &DS);
2888  const LookupResult &R);
2891  const LookupResult &R);
2892  void CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,
2893  const LookupResult &R);
2894  void CheckShadow(Scope *S, VarDecl *D);
2895 
2896  /// Warn if 'E', which is an expression that is about to be modified, refers
2897  /// to a shadowing declaration.
2899 
2901 
2902 private:
2903  /// Map of current shadowing declarations to shadowed declarations. Warn if
2904  /// it looks like the user is trying to modify the shadowing declaration.
2905  llvm::DenseMap<const NamedDecl *, const NamedDecl *> ShadowingDecls;
2906 
2907 public:
2908  void CheckCastAlign(Expr *Op, QualType T, SourceRange TRange);
2909  void handleTagNumbering(const TagDecl *Tag, Scope *TagScope);
2910  void setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec,
2911  TypedefNameDecl *NewTD);
2914  TypeSourceInfo *TInfo,
2917  LookupResult &Previous, bool &Redeclaration);
2919  Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo,
2920  LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists,
2921  bool &AddToScope, ArrayRef<BindingDecl *> Bindings = std::nullopt);
2922  NamedDecl *
2924  MultiTemplateParamsArg TemplateParamLists);
2925  // Returns true if the variable declaration is a redeclaration
2928  bool DeduceVariableDeclarationType(VarDecl *VDecl, bool DirectInit,
2929  Expr *Init);
2933 
2935  TypeSourceInfo *TInfo,
2937  MultiTemplateParamsArg TemplateParamLists,
2938  bool &AddToScope);
2940 
2941  enum class CheckConstexprKind {
2942  /// Diagnose issues that are non-constant or that are extensions.
2943  Diagnose,
2944  /// Identify whether this function satisfies the formal rules for constexpr
2945  /// functions in the current lanugage mode (with no extensions).
2946  CheckValid
2947  };
2948 
2951 
2954  SmallVectorImpl<CXXMethodDecl*> &OverloadedMethods);
2956  SmallVectorImpl<CXXMethodDecl*> &OverloadedMethods);
2957  // Returns true if the function declaration is a redeclaration
2960  bool IsMemberSpecialization, bool DeclIsDefn);
2961  bool shouldLinkDependentDeclWithPrevious(Decl *D, Decl *OldDecl);
2963  QualType NewT, QualType OldT);
2964  void CheckMain(FunctionDecl *FD, const DeclSpec &D);
2968  bool IsDefinition);
2972  SourceLocation Loc,
2973  QualType T);
2975  SourceLocation NameLoc, IdentifierInfo *Name,
2976  QualType T, TypeSourceInfo *TSInfo,
2977  StorageClass SC);
2978  void ActOnParamDefaultArgument(Decl *param,
2979  SourceLocation EqualLoc,
2980  Expr *defarg);
2982  SourceLocation ArgLoc);
2983  void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc);
2985  SourceLocation EqualLoc);
2986  void SetParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg,
2987  SourceLocation EqualLoc);
2988 
2989  // Contexts where using non-trivial C union types can be disallowed. This is
2990  // passed to err_non_trivial_c_union_in_invalid_context.
2992  // Function parameter.
2994  // Function return.
2996  // Default-initialized object.
2998  // Variable with automatic storage duration.
3000  // Initializer expression that might copy from another object.
3002  // Assignment.
3004  // Compound literal.
3006  // Block capture.
3008  // lvalue-to-rvalue conversion of volatile type.
3010  };
3011 
3012  /// Emit diagnostics if the initializer or any of its explicit or
3013  /// implicitly-generated subexpressions require copying or
3014  /// default-initializing a type that is or contains a C union type that is
3015  /// non-trivial to copy or default-initialize.
3017 
3018  // These flags are passed to checkNonTrivialCUnion.
3020  NTCUK_Init = 0x1,
3022  NTCUK_Copy = 0x4,
3023  };
3024 
3025  /// Emit diagnostics if a non-trivial C union type or a struct that contains
3026  /// a non-trivial C union is used in an invalid context.
3028  NonTrivialCUnionContext UseContext,
3029  unsigned NonTrivialKind);
3030 
3031  void AddInitializerToDecl(Decl *dcl, Expr *init, bool DirectInit);
3032  void ActOnUninitializedDecl(Decl *dcl);
3033  void ActOnInitializerError(Decl *Dcl);
3034 
3035  void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc);
3036  void ActOnCXXForRangeDecl(Decl *D);
3038  IdentifierInfo *Ident,
3039  ParsedAttributes &Attrs);
3040  void SetDeclDeleted(Decl *dcl, SourceLocation DelLoc);
3041  void SetDeclDefaulted(Decl *dcl, SourceLocation DefaultLoc);
3044  void FinalizeDeclaration(Decl *D);
3048 
3049  /// Should be called on all declarations that might have attached
3050  /// documentation comments.
3051  void ActOnDocumentableDecl(Decl *D);
3053 
3054  enum class FnBodyKind {
3055  /// C++ [dcl.fct.def.general]p1
3056  /// function-body:
3057  /// ctor-initializer[opt] compound-statement
3058  /// function-try-block
3059  Other,
3060  /// = default ;
3061  Default,
3062  /// = delete ;
3063  Delete
3064  };
3065 
3067  SourceLocation LocAfterDecls);
3069  FunctionDecl *FD, const FunctionDecl *EffectiveDefinition = nullptr,
3070  SkipBodyInfo *SkipBody = nullptr);
3072  MultiTemplateParamsArg TemplateParamLists,
3073  SkipBodyInfo *SkipBody = nullptr,
3074  FnBodyKind BodyKind = FnBodyKind::Other);
3076  SkipBodyInfo *SkipBody = nullptr,
3077  FnBodyKind BodyKind = FnBodyKind::Other);
3078  void SetFunctionBodyKind(Decl *D, SourceLocation Loc, FnBodyKind BodyKind);
3081  ExprResult ActOnRequiresClause(ExprResult ConstraintExpr);
3082  void ActOnStartOfObjCMethodDef(Scope *S, Decl *D);
3084  return D && isa<ObjCMethodDecl>(D);
3085  }
3086 
3087  /// Determine whether we can delay parsing the body of a function or
3088  /// function template until it is used, assuming we don't care about emitting
3089  /// code for that function.
3090  ///
3091  /// This will be \c false if we may need the body of the function in the
3092  /// middle of parsing an expression (where it's impractical to switch to
3093  /// parsing a different function), for instance, if it's constexpr in C++11
3094  /// or has an 'auto' return type in C++14. These cases are essentially bugs.
3095  bool canDelayFunctionBody(const Declarator &D);
3096 
3097  /// Determine whether we can skip parsing the body of a function
3098  /// definition, assuming we don't care about analyzing its body or emitting
3099  /// code for that function.
3100  ///
3101  /// This will be \c false only if we may need the body of the function in
3102  /// order to parse the rest of the program (for instance, if it is
3103  /// \c constexpr in C++11 or has an 'auto' return type in C++14).
3104  bool canSkipFunctionBody(Decl *D);
3105 
3106  /// Determine whether \param D is function like (function or function
3107  /// template) for parsing.
3109 
3112  Decl *ActOnFinishFunctionBody(Decl *Decl, Stmt *Body, bool IsInstantiation);
3115 
3116  /// ActOnFinishDelayedAttribute - Invoked when we have finished parsing an
3117  /// attribute for which parsing is delayed.
3119 
3120  /// Diagnose any unused parameters in the given sequence of
3121  /// ParmVarDecl pointers.
3123 
3124  /// Diagnose whether the size of parameters or return value of a
3125  /// function or obj-c method definition is pass-by-value and larger than a
3126  /// specified threshold.
3127  void
3129  QualType ReturnTy, NamedDecl *D);
3130 
3131  void DiagnoseInvalidJumps(Stmt *Body);
3133  SourceLocation AsmLoc,
3134  SourceLocation RParenLoc);
3135 
3136  Decl *ActOnTopLevelStmtDecl(Stmt *Statement);
3137 
3138  /// Handle a C++11 empty-declaration and attribute-declaration.
3140  SourceLocation SemiLoc);
3141 
3142  enum class ModuleDeclKind {
3143  Interface, ///< 'export module X;'
3144  Implementation, ///< 'module X;'
3145  PartitionInterface, ///< 'export module X:Y;'
3146  PartitionImplementation, ///< 'module X:Y;'
3147  };
3148 
3149  /// An enumeration to represent the transition of states in parsing module
3150  /// fragments and imports. If we are not parsing a C++20 TU, or we find
3151  /// an error in state transition, the state is set to NotACXX20Module.
3152  enum class ModuleImportState {
3153  FirstDecl, ///< Parsing the first decl in a TU.
3154  GlobalFragment, ///< after 'module;' but before 'module X;'
3155  ImportAllowed, ///< after 'module X;' but before any non-import decl.
3156  ImportFinished, ///< after any non-import decl.
3157  PrivateFragmentImportAllowed, ///< after 'module :private;' but before any
3158  ///< non-import decl.
3159  PrivateFragmentImportFinished, ///< after 'module :private;' but a
3160  ///< non-import decl has already been seen.
3161  NotACXX20Module ///< Not a C++20 TU, or an invalid state was found.
3162  };
3163 
3164 private:
3165  /// The parser has begun a translation unit to be compiled as a C++20
3166  /// Header Unit, helper for ActOnStartOfTranslationUnit() only.
3167  void HandleStartOfHeaderUnit();
3168 
3169 public:
3170  /// The parser has processed a module-declaration that begins the definition
3171  /// of a module interface or implementation.
3173  SourceLocation ModuleLoc, ModuleDeclKind MDK,
3174  ModuleIdPath Path, ModuleIdPath Partition,
3175  ModuleImportState &ImportState);
3176 
3177  /// The parser has processed a global-module-fragment declaration that begins
3178  /// the definition of the global module fragment of the current module unit.
3179  /// \param ModuleLoc The location of the 'module' keyword.
3181 
3182  /// The parser has processed a private-module-fragment declaration that begins
3183  /// the definition of the private module fragment of the current module unit.
3184  /// \param ModuleLoc The location of the 'module' keyword.
3185  /// \param PrivateLoc The location of the 'private' keyword.
3187  SourceLocation PrivateLoc);
3188 
3189  /// The parser has processed a module import declaration.
3190  ///
3191  /// \param StartLoc The location of the first token in the declaration. This
3192  /// could be the location of an '@', 'export', or 'import'.
3193  /// \param ExportLoc The location of the 'export' keyword, if any.
3194  /// \param ImportLoc The location of the 'import' keyword.
3195  /// \param Path The module toplevel name as an access path.
3196  /// \param IsPartition If the name is for a partition.
3198  SourceLocation ExportLoc,
3199  SourceLocation ImportLoc, ModuleIdPath Path,
3200  bool IsPartition = false);
3202  SourceLocation ExportLoc,
3203  SourceLocation ImportLoc, Module *M,
3204  ModuleIdPath Path = {});
3205 
3206  /// The parser has processed a module import translated from a
3207  /// #include or similar preprocessing directive.
3208  void ActOnModuleInclude(SourceLocation DirectiveLoc, Module *Mod);
3209  void BuildModuleInclude(SourceLocation DirectiveLoc, Module *Mod);
3210 
3211  /// The parsed has entered a submodule.
3212  void ActOnModuleBegin(SourceLocation DirectiveLoc, Module *Mod);
3213  /// The parser has left a submodule.
3214  void ActOnModuleEnd(SourceLocation DirectiveLoc, Module *Mod);
3215 
3216  /// Create an implicit import of the given module at the given
3217  /// source location, for error recovery, if possible.
3218  ///
3219  /// This routine is typically used when an entity found by name lookup
3220  /// is actually hidden within a module that we know about but the user
3221  /// has forgotten to import.
3222  void createImplicitModuleImportForErrorRecovery(SourceLocation Loc,
3223  Module *Mod);
3224 
3225  /// Kinds of missing import. Note, the values of these enumerators correspond
3226  /// to %select values in diagnostics.
3227  enum class MissingImportKind {
3228  Declaration,
3229  Definition,
3233  };
3234 
3235  /// Diagnose that the specified declaration needs to be visible but
3236  /// isn't, and suggest a module import that would resolve the problem.
3238  MissingImportKind MIK, bool Recover = true);
3240  SourceLocation DeclLoc, ArrayRef<Module *> Modules,
3241  MissingImportKind MIK, bool Recover);
3242 
3244  SourceLocation LBraceLoc);
3246  SourceLocation RBraceLoc);
3247 
3248  /// We've found a use of a templated declaration that would trigger an
3249  /// implicit instantiation. Check that any relevant explicit specializations
3250  /// and partial specializations are visible/reachable, and diagnose if not.
3253 
3254  /// Retrieve a suitable printing policy for diagnostics.
3256  return getPrintingPolicy(Context, PP);
3257  }
3258 
3259  /// Retrieve a suitable printing policy for diagnostics.
3260  static PrintingPolicy getPrintingPolicy(const ASTContext &Ctx,
3261  const Preprocessor &PP);
3262 
3263  /// Scope actions.
3264  void ActOnPopScope(SourceLocation Loc, Scope *S);
3266 
3268  const ParsedAttributesView &DeclAttrs,
3269  RecordDecl *&AnonRecord);
3271  const ParsedAttributesView &DeclAttrs,
3272  MultiTemplateParamsArg TemplateParams,
3273  bool IsExplicitInstantiation,
3274  RecordDecl *&AnonRecord);
3275 
3277  AccessSpecifier AS,
3278  RecordDecl *Record,
3279  const PrintingPolicy &Policy);
3280 
3282  RecordDecl *Record);
3283 
3284  /// Common ways to introduce type names without a tag for use in diagnostics.
3285  /// Keep in sync with err_tag_reference_non_tag.
3286  enum NonTagKind {
3296  };
3297 
3298  /// Given a non-tag type declaration, returns an enum useful for indicating
3299  /// what kind of non-tag type this is.
3301 
3303  TagTypeKind NewTag, bool isDefinition,
3304  SourceLocation NewTagLoc,
3305  const IdentifierInfo *Name);
3306 
3307  enum TagUseKind {
3308  TUK_Reference, // Reference to a tag: 'struct foo *X;'
3309  TUK_Declaration, // Fwd decl of a tag: 'struct foo;'
3310  TUK_Definition, // Definition of a tag: 'struct foo { int X; } Y;'
3311  TUK_Friend // Friend declaration: 'friend struct foo;'
3312  };
3313 
3315  // Not parsing a type within __builtin_offsetof.
3317  // Parsing a type within __builtin_offsetof.
3319  // Parsing a type within macro "offsetof", defined in __buitin_offsetof
3320  // To improve our diagnostic message.
3322  };
3323 
3324  DeclResult ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
3325  SourceLocation KWLoc, CXXScopeSpec &SS,
3326  IdentifierInfo *Name, SourceLocation NameLoc,
3328  SourceLocation ModulePrivateLoc,
3329  MultiTemplateParamsArg TemplateParameterLists,
3330  bool &OwnedDecl, bool &IsDependent,
3331  SourceLocation ScopedEnumKWLoc,
3332  bool ScopedEnumUsesClassTag, TypeResult UnderlyingType,
3333  bool IsTypeSpecifier, bool IsTemplateParamOrArg,
3334  OffsetOfKind OOK, SkipBodyInfo *SkipBody = nullptr);
3335 
3337  unsigned TagSpec, SourceLocation TagLoc,
3338  CXXScopeSpec &SS, IdentifierInfo *Name,
3339  SourceLocation NameLoc,
3340  const ParsedAttributesView &Attr,
3341  MultiTemplateParamsArg TempParamLists);
3342 
3344  unsigned TagSpec,
3345  TagUseKind TUK,
3346  const CXXScopeSpec &SS,
3347  IdentifierInfo *Name,
3348  SourceLocation TagLoc,
3349  SourceLocation NameLoc);
3350 
3351  void ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart,
3352  IdentifierInfo *ClassName,
3353  SmallVectorImpl<Decl *> &Decls);
3354  Decl *ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart,
3355  Declarator &D, Expr *BitfieldWidth);
3356 
3357  FieldDecl *HandleField(Scope *S, RecordDecl *TagD, SourceLocation DeclStart,
3358  Declarator &D, Expr *BitfieldWidth,
3359  InClassInitStyle InitStyle,
3360  AccessSpecifier AS);
3362  SourceLocation DeclStart, Declarator &D,
3363  Expr *BitfieldWidth,
3364  InClassInitStyle InitStyle,
3365  AccessSpecifier AS,
3366  const ParsedAttr &MSPropertyAttr);
3367 
3369  TypeSourceInfo *TInfo,
3370  RecordDecl *Record, SourceLocation Loc,
3371  bool Mutable, Expr *BitfieldWidth,
3372  InClassInitStyle InitStyle,
3373  SourceLocation TSSL,
3374  AccessSpecifier AS, NamedDecl *PrevDecl,
3375  Declarator *D = nullptr);
3376 
3377  bool CheckNontrivialField(FieldDecl *FD);
3378  void DiagnoseNontrivial(const CXXRecordDecl *Record, CXXSpecialMember CSM);
3379 
3381  /// The triviality of a method unaffected by "trivial_abi".
3383 
3384  /// The triviality of a method affected by "trivial_abi".
3386  };
3387 
3390  bool Diagnose = false);
3391 
3392  /// For a defaulted function, the kind of defaulted function that it is.
3394  CXXSpecialMember SpecialMember : 8;
3395  DefaultedComparisonKind Comparison : 8;
3396 
3397  public:
3399  : SpecialMember(CXXInvalid), Comparison(DefaultedComparisonKind::None) {
3400  }
3402  : SpecialMember(CSM), Comparison(DefaultedComparisonKind::None) {}
3404  : SpecialMember(CXXInvalid), Comparison(Comp) {}
3405 
3406  bool isSpecialMember() const { return SpecialMember != CXXInvalid; }
3407  bool isComparison() const {
3408  return Comparison != DefaultedComparisonKind::None;
3409  }
3410 
3411  explicit operator bool() const {
3412  return isSpecialMember() || isComparison();
3413  }
3414 
3415  CXXSpecialMember asSpecialMember() const { return SpecialMember; }
3416  DefaultedComparisonKind asComparison() const { return Comparison; }
3417 
3418  /// Get the index of this function kind for use in diagnostics.
3419  unsigned getDiagnosticIndex() const {
3420  static_assert(CXXInvalid > CXXDestructor,
3421  "invalid should have highest index");
3422  static_assert((unsigned)DefaultedComparisonKind::None == 0,
3423  "none should be equal to zero");
3424  return SpecialMember + (unsigned)Comparison;
3425  }
3426  };
3427 
3428  DefaultedFunctionKind getDefaultedFunctionKind(const FunctionDecl *FD);
3429 
3432  }
3435  }
3436 
3437  void ActOnLastBitfield(SourceLocation DeclStart,
3438  SmallVectorImpl<Decl *> &AllIvarDecls);
3439  Decl *ActOnIvar(Scope *S, SourceLocation DeclStart,
3440  Declarator &D, Expr *BitfieldWidth,
3441  tok::ObjCKeywordKind visibility);
3442 
3443  // This is used for both record definitions and ObjC interface declarations.
3444  void ActOnFields(Scope *S, SourceLocation RecLoc, Decl *TagDecl,
3445  ArrayRef<Decl *> Fields, SourceLocation LBrac,
3446  SourceLocation RBrac, const ParsedAttributesView &AttrList);
3447 
3448  /// ActOnTagStartDefinition - Invoked when we have entered the
3449  /// scope of a tag's definition (e.g., for an enumeration, class,
3450  /// struct, or union).
3452 
3453  /// Perform ODR-like check for C/ObjC when merging tag types from modules.
3454  /// Differently from C++, actually parse the body and reject / error out
3455  /// in case of a structural mismatch.
3456  bool ActOnDuplicateDefinition(Decl *Prev, SkipBodyInfo &SkipBody);
3457 
3458  /// Check ODR hashes for C/ObjC when merging types from modules.
3459  /// Differently from C++, actually parse the body and reject in case
3460  /// of a mismatch.
3461  template <typename T,
3462  typename = std::enable_if_t<std::is_base_of<NamedDecl, T>::value>>
3464  if (Duplicate->getODRHash() != Previous->getODRHash())
3465  return false;
3466 
3467  // Make the previous decl visible.
3469  return true;
3470  }
3471 
3473 
3474  /// Invoked when we enter a tag definition that we're skipping.
3476 
3478 
3479  /// ActOnStartCXXMemberDeclarations - Invoked when we have parsed a
3480  /// C++ record definition's base-specifiers clause and are starting its
3481  /// member declarations.
3483  SourceLocation FinalLoc,
3484  bool IsFinalSpelledSealed,
3485  bool IsAbstract,
3486  SourceLocation LBraceLoc);
3487 
3488  /// ActOnTagFinishDefinition - Invoked once we have finished parsing
3489  /// the definition of a tag (enumeration, class, struct, or union).
3491  SourceRange BraceRange);
3492 
3494 
3496 
3497  /// Invoked when we must temporarily exit the objective-c container
3498  /// scope for parsing/looking-up C constructs.
3499  ///
3500  /// Must be followed by a call to \see ActOnObjCReenterContainerContext
3503 
3504  /// ActOnTagDefinitionError - Invoked when there was an unrecoverable
3505  /// error parsing the definition of a tag.
3507 
3509  EnumConstantDecl *LastEnumConst,
3510  SourceLocation IdLoc,
3511  IdentifierInfo *Id,
3512  Expr *val);
3514  bool CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped,
3515  QualType EnumUnderlyingTy, bool IsFixed,
3516  const EnumDecl *Prev);
3517 
3518  /// Determine whether the body of an anonymous enumeration should be skipped.
3519  /// \param II The name of the first enumerator.
3521  SourceLocation IILoc);
3522 
3523  Decl *ActOnEnumConstant(Scope *S, Decl *EnumDecl, Decl *LastEnumConstant,
3525  const ParsedAttributesView &Attrs,
3526  SourceLocation EqualLoc, Expr *Val);
3527  void ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
3528  Decl *EnumDecl, ArrayRef<Decl *> Elements, Scope *S,
3529  const ParsedAttributesView &Attr);
3530 
3531  /// Set the current declaration context until it gets popped.
3532  void PushDeclContext(Scope *S, DeclContext *DC);
3533  void PopDeclContext();
3534 
3535  /// EnterDeclaratorContext - Used when we must lookup names in the context
3536  /// of a declarator's nested name specifier.
3538  void ExitDeclaratorContext(Scope *S);
3539 
3540  /// Enter a template parameter scope, after it's been associated with a particular
3541  /// DeclContext. Causes lookup within the scope to chain through enclosing contexts
3542  /// in the correct order.
3543  void EnterTemplatedContext(Scope *S, DeclContext *DC);
3544 
3545  /// Push the parameters of D, which must be a function, into scope.
3546  void ActOnReenterFunctionContext(Scope* S, Decl* D);
3547  void ActOnExitFunctionContext();
3548 
3549  /// If \p AllowLambda is true, treat lambda as function.
3550  DeclContext *getFunctionLevelDeclContext(bool AllowLambda = false);
3551 
3552  /// Returns a pointer to the innermost enclosing function, or nullptr if the
3553  /// current context is not inside a function. If \p AllowLambda is true,
3554  /// this can return the call operator of an enclosing lambda, otherwise
3555  /// lambdas are skipped when looking for an enclosing function.
3556  FunctionDecl *getCurFunctionDecl(bool AllowLambda = false);
3557 
3558  /// getCurMethodDecl - If inside of a method body, this returns a pointer to
3559  /// the method decl for the method being parsed. If we're currently
3560  /// in a 'block', this returns the containing context.
3562 
3563  /// getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method
3564  /// or C function we're in, otherwise return null. If we're currently
3565  /// in a 'block', this returns the containing context.
3567 
3568  /// Add this decl to the scope shadowed decl chains.
3569  void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext = true);
3570 
3571  /// isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true
3572  /// if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns
3573  /// true if 'D' belongs to the given declaration context.
3574  ///
3575  /// \param AllowInlineNamespace If \c true, allow the declaration to be in the
3576  /// enclosing namespace set of the context, rather than contained
3577  /// directly within it.
3578  bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S = nullptr,
3579  bool AllowInlineNamespace = false);
3580 
3581  /// Finds the scope corresponding to the given decl context, if it
3582  /// happens to be an enclosing scope. Otherwise return NULL.
3583  static Scope *getScopeForDeclContext(Scope *S, DeclContext *DC);
3584 
3585  /// Subroutines of ActOnDeclarator().
3587  TypeSourceInfo *TInfo);
3589 
3590  /// Describes the kind of merge to perform for availability
3591  /// attributes (including "deprecated", "unavailable", and "availability").
3593  /// Don't merge availability attributes at all.
3595  /// Merge availability attributes for a redeclaration, which requires
3596  /// an exact match.
3598  /// Merge availability attributes for an override, which requires
3599  /// an exact match or a weakening of constraints.
3601  /// Merge availability attributes for an implementation of
3602  /// a protocol requirement.
3604  /// Merge availability attributes for an implementation of
3605  /// an optional protocol requirement.
3607  };
3608 
3609  /// Describes the kind of priority given to an availability attribute.
3610  ///
3611  /// The sum of priorities deteremines the final priority of the attribute.
3612  /// The final priority determines how the attribute will be merged.
3613  /// An attribute with a lower priority will always remove higher priority
3614  /// attributes for the specified platform when it is being applied. An
3615  /// attribute with a higher priority will not be applied if the declaration
3616  /// already has an availability attribute with a lower priority for the
3617  /// specified platform. The final prirority values are not expected to match
3618  /// the values in this enumeration, but instead should be treated as a plain
3619  /// integer value. This enumeration just names the priority weights that are
3620  /// used to calculate that final vaue.
3622  /// The availability attribute was specified explicitly next to the
3623  /// declaration.
3625 
3626  /// The availability attribute was applied using '#pragma clang attribute'.
3628 
3629  /// The availability attribute for a specific platform was inferred from
3630  /// an availability attribute for another platform.
3632  };
3633 
3634  /// Attribute merging methods. Return true if a new attribute was added.
3635  AvailabilityAttr *
3637  IdentifierInfo *Platform, bool Implicit,
3638  VersionTuple Introduced, VersionTuple Deprecated,
3639  VersionTuple Obsoleted, bool IsUnavailable,
3640  StringRef Message, bool IsStrict, StringRef Replacement,
3641  AvailabilityMergeKind AMK, int Priority);
3642  TypeVisibilityAttr *
3644  TypeVisibilityAttr::VisibilityType Vis);
3645  VisibilityAttr *mergeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI,
3646  VisibilityAttr::VisibilityType Vis);
3647  UuidAttr *mergeUuidAttr(Decl *D, const AttributeCommonInfo &CI,
3648  StringRef UuidAsWritten, MSGuidDecl *GuidDecl);
3649  DLLImportAttr *mergeDLLImportAttr(Decl *D, const AttributeCommonInfo &CI);
3650  DLLExportAttr *mergeDLLExportAttr(Decl *D, const AttributeCommonInfo &CI);
3651  MSInheritanceAttr *mergeMSInheritanceAttr(Decl *D,
3652  const AttributeCommonInfo &CI,
3653  bool BestCase,
3654  MSInheritanceModel Model);
3655  ErrorAttr *mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI,
3656  StringRef NewUserDiagnostic);
3657  FormatAttr *mergeFormatAttr(Decl *D, const AttributeCommonInfo &CI,
3658  IdentifierInfo *Format, int FormatIdx,
3659  int FirstArg);
3660  SectionAttr *mergeSectionAttr(Decl *D, const AttributeCommonInfo &CI,
3661  StringRef Name);
3662  CodeSegAttr *mergeCodeSegAttr(Decl *D, const AttributeCommonInfo &CI,
3663  StringRef Name);
3664  AlwaysInlineAttr *mergeAlwaysInlineAttr(Decl *D,
3665  const AttributeCommonInfo &CI,
3666  const IdentifierInfo *Ident);
3667  MinSizeAttr *mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI);
3668  SwiftNameAttr *mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA,
3669  StringRef Name);
3670  OptimizeNoneAttr *mergeOptimizeNoneAttr(Decl *D,
3671  const AttributeCommonInfo &CI);
3672  InternalLinkageAttr *mergeInternalLinkageAttr(Decl *D, const ParsedAttr &AL);
3673  InternalLinkageAttr *mergeInternalLinkageAttr(Decl *D,
3674  const InternalLinkageAttr &AL);
3675  WebAssemblyImportNameAttr *mergeImportNameAttr(
3676  Decl *D, const WebAssemblyImportNameAttr &AL);
3677  WebAssemblyImportModuleAttr *mergeImportModuleAttr(
3678  Decl *D, const WebAssemblyImportModuleAttr &AL);
3679  EnforceTCBAttr *mergeEnforceTCBAttr(Decl *D, const EnforceTCBAttr &AL);
3680  EnforceTCBLeafAttr *mergeEnforceTCBLeafAttr(Decl *D,
3681  const EnforceTCBLeafAttr &AL);
3682  BTFDeclTagAttr *mergeBTFDeclTagAttr(Decl *D, const BTFDeclTagAttr &AL);
3683  HLSLNumThreadsAttr *mergeHLSLNumThreadsAttr(Decl *D,
3684  const AttributeCommonInfo &AL,
3685  int X, int Y, int Z);
3686  HLSLShaderAttr *mergeHLSLShaderAttr(Decl *D, const AttributeCommonInfo &AL,
3687  HLSLShaderAttr::ShaderType ShaderType);
3688 
3689  void mergeDeclAttributes(NamedDecl *New, Decl *Old,
3692  LookupResult &OldDecls);
3693  bool MergeFunctionDecl(FunctionDecl *New, NamedDecl *&Old, Scope *S,
3694  bool MergeTypeWithOld, bool NewDeclIsDefn);
3696  Scope *S, bool MergeTypeWithOld);
3699  void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld);
3700  void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old);
3701  bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn);
3702  void notePreviousDefinition(const NamedDecl *Old, SourceLocation New);
3703  bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S);
3704 
3705  // AssignmentAction - This is used by all the assignment diagnostic functions
3706  // to represent what is actually causing the operation
3716  };
3717 
3718  /// C++ Overloading.
3720  /// This is a legitimate overload: the existing declarations are
3721  /// functions or function templates with different signatures.
3723 
3724  /// This is not an overload because the signature exactly matches
3725  /// an existing declaration.
3727 
3728  /// This is not an overload because the lookup results contain a
3729  /// non-function.
3731  };
3733  FunctionDecl *New,
3734  const LookupResult &OldDecls,
3735  NamedDecl *&OldDecl,
3736  bool UseMemberUsingDeclRules);
3737  bool IsOverload(FunctionDecl *New, FunctionDecl *Old,
3738  bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs = true,
3739  bool ConsiderRequiresClauses = true);
3740 
3741  // Calculates whether the expression Constraint depends on an enclosing
3742  // template, for the purposes of [temp.friend] p9.
3743  // TemplateDepth is the 'depth' of the friend function, which is used to
3744  // compare whether a declaration reference is referring to a containing
3745  // template, or just the current friend function. A 'lower' TemplateDepth in
3746  // the AST refers to a 'containing' template. As the constraint is
3747  // uninstantiated, this is relative to the 'top' of the TU.
3748  bool
3750  unsigned TemplateDepth,
3751  const Expr *Constraint);
3752 
3753  // Calculates whether the friend function depends on an enclosing template for
3754  // the purposes of [temp.friend] p9.
3756 
3757  // Calculates whether two constraint expressions are equal irrespective of a
3758  // difference in 'depth'. This takes a pair of optional 'NamedDecl's 'Old' and
3759  // 'New', which are the "source" of the constraint, since this is necessary
3760  // for figuring out the relative 'depth' of the constraint. The depth of the
3761  // 'primary template' and the 'instantiated from' templates aren't necessarily
3762  // the same, such as a case when one is a 'friend' defined in a class.
3763  bool AreConstraintExpressionsEqual(const NamedDecl *Old,
3764  const Expr *OldConstr,
3765  const NamedDecl *New,
3766  const Expr *NewConstr);
3767 
3768  enum class AllowedExplicit {
3769  /// Allow no explicit functions to be used.
3770  None,
3771  /// Allow explicit conversion functions but not explicit constructors.
3772  Conversions,
3773  /// Allow both explicit conversion functions and explicit constructors.
3774  All
3775  };
3776 
3778  TryImplicitConversion(Expr *From, QualType ToType,
3779  bool SuppressUserConversions,
3780  AllowedExplicit AllowExplicit,
3781  bool InOverloadResolution,
3782  bool CStyle,
3783  bool AllowObjCWritebackConversion);
3784 
3785  bool IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType);
3786  bool IsFloatingPointPromotion(QualType FromType, QualType ToType);
3787  bool IsComplexPromotion(QualType FromType, QualType ToType);
3788  bool IsPointerConversion(Expr *From, QualType FromType, QualType ToType,
3789  bool InOverloadResolution,
3790  QualType& ConvertedType, bool &IncompatibleObjC);
3791  bool isObjCPointerConversion(QualType FromType, QualType ToType,
3792  QualType& ConvertedType, bool &IncompatibleObjC);
3793  bool isObjCWritebackConversion(QualType FromType, QualType ToType,
3794  QualType &ConvertedType);
3795  bool IsBlockPointerConversion(QualType FromType, QualType ToType,
3796  QualType& ConvertedType);
3797  bool FunctionParamTypesAreEqual(const FunctionProtoType *OldType,
3798  const FunctionProtoType *NewType,
3799  unsigned *ArgPos = nullptr,
3800  bool Reversed = false);
3802  QualType FromType, QualType ToType);
3803 
3806  bool CheckPointerConversion(Expr *From, QualType ToType,
3807  CastKind &Kind,
3808  CXXCastPath& BasePath,
3809  bool IgnoreBaseAccess,
3810  bool Diagnose = true);
3811  bool IsMemberPointerConversion(Expr *From, QualType FromType, QualType ToType,
3812  bool InOverloadResolution,
3813  QualType &ConvertedType);
3814  bool CheckMemberPointerConversion(Expr *From, QualType ToType,
3815  CastKind &Kind,
3816  CXXCastPath &BasePath,
3817  bool IgnoreBaseAccess);
3818  bool IsQualificationConversion(QualType FromType, QualType ToType,
3819  bool CStyle, bool &ObjCLifetimeConversion);
3820  bool IsFunctionConversion(QualType FromType, QualType ToType,
3821  QualType &ResultTy);
3824 
3826  const InitializedEntity &Entity, InitListExpr *From);
3827 
3828  bool IsStringInit(Expr *Init, const ArrayType *AT);
3829 
3831  ExprResult Init);
3833  SourceLocation EqualLoc,
3834  ExprResult Init,
3835  bool TopLevelOfInitList = false,
3836  bool AllowExplicit = false);
3838  NestedNameSpecifier *Qualifier,
3839  NamedDecl *FoundDecl,
3840  CXXMethodDecl *Method);
3841 
3842  /// Check that the lifetime of the initializer (and its subobjects) is
3843  /// sufficient for initializing the entity, and perform lifetime extension
3844  /// (when permitted) if not.
3845  void checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init);
3846 
3849 
3850  /// Contexts in which a converted constant expression is required.
3851  enum CCEKind {
3852  CCEK_CaseValue, ///< Expression in a case label.
3853  CCEK_Enumerator, ///< Enumerator value with fixed underlying type.
3854  CCEK_TemplateArg, ///< Value of a non-type template parameter.
3855  CCEK_ArrayBound, ///< Array bound in array declarator or new-expression.
3856  CCEK_ExplicitBool, ///< Condition in an explicit(bool) specifier.
3857  CCEK_Noexcept ///< Condition in a noexcept(bool) specifier.
3858  };
3860  llvm::APSInt &Value, CCEKind CCE);
3862  APValue &Value, CCEKind CCE,
3863  NamedDecl *Dest = nullptr);
3864 
3865  /// Abstract base class used to perform a contextual implicit
3866  /// conversion from an expression to any type passing a filter.
3868  public:
3869  bool Suppress;
3871 
3873  bool SuppressConversion = false)
3875 
3876  /// Determine whether the specified type is a valid destination type
3877  /// for this conversion.
3878  virtual bool match(QualType T) = 0;
3879 
3880  /// Emits a diagnostic complaining that the expression does not have
3881  /// integral or enumeration type.
3882  virtual SemaDiagnosticBuilder
3883  diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T) = 0;
3884 
3885  /// Emits a diagnostic when the expression has incomplete class type.
3886  virtual SemaDiagnosticBuilder
3888 
3889  /// Emits a diagnostic when the only matching conversion function
3890  /// is explicit.
3892  Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) = 0;
3893 
3894  /// Emits a note for the explicit conversion function.
3895  virtual SemaDiagnosticBuilder
3896  noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) = 0;
3897 
3898  /// Emits a diagnostic when there are multiple possible conversion
3899  /// functions.
3900  virtual SemaDiagnosticBuilder
3902 
3903  /// Emits a note for one of the candidate conversions.
3904  virtual SemaDiagnosticBuilder
3905  noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) = 0;
3906 
3907  /// Emits a diagnostic when we picked a conversion function
3908  /// (for cases when we are not allowed to pick a conversion function).
3910  Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) = 0;
3911 
3913  };
3914 
3916  bool AllowScopedEnumerations;
3917 
3918  public:
3919  ICEConvertDiagnoser(bool AllowScopedEnumerations,
3920  bool Suppress, bool SuppressConversion)
3922  AllowScopedEnumerations(AllowScopedEnumerations) {}
3923 
3924  /// Match an integral or (possibly scoped) enumeration type.
3925  bool match(QualType T) override;
3926 
3929  return diagnoseNotInt(S, Loc, T);
3930  }
3931 
3932  /// Emits a diagnostic complaining that the expression does not have
3933  /// integral or enumeration type.
3934  virtual SemaDiagnosticBuilder
3935  diagnoseNotInt(Sema &S, SourceLocation Loc, QualType T) = 0;
3936  };
3937 
3938  /// Perform a contextual implicit conversion.
3940  SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter);
3941 
3942 
3947  };
3949 
3950  // Note that LK_String is intentionally after the other literals, as
3951  // this is used for diagnostics logic.
3960  };
3962 
3964  NestedNameSpecifier *Qualifier,
3965  NamedDecl *FoundDecl,
3966  NamedDecl *Member);
3967 
3968  // Members have to be NamespaceDecl* or TranslationUnitDecl*.
3969  // TODO: make this is a typesafe union.
3972 
3974 
3975  void AddOverloadCandidate(
3976  FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef<Expr *> Args,
3977  OverloadCandidateSet &CandidateSet, bool SuppressUserConversions = false,
3978  bool PartialOverloading = false, bool AllowExplicit = true,
3979  bool AllowExplicitConversion = false,
3980  ADLCallKind IsADLCandidate = ADLCallKind::NotADL,
3981  ConversionSequenceList EarlyConversions = std::nullopt,
3982  OverloadCandidateParamOrder PO = {});
3983  void AddFunctionCandidates(const UnresolvedSetImpl &Functions,
3984  ArrayRef<Expr *> Args,
3985  OverloadCandidateSet &CandidateSet,
3986  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr,
3987  bool SuppressUserConversions = false,
3988  bool PartialOverloading = false,
3989  bool FirstArgumentIsBase = false);
3990  void AddMethodCandidate(DeclAccessPair FoundDecl,
3991  QualType ObjectType,
3992  Expr::Classification ObjectClassification,
3993  ArrayRef<Expr *> Args,
3994  OverloadCandidateSet& CandidateSet,
3995  bool SuppressUserConversion = false,
3996  OverloadCandidateParamOrder PO = {});
3997  void
3998  AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl,
3999  CXXRecordDecl *ActingContext, QualType ObjectType,
4000  Expr::Classification ObjectClassification,
4001  ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet,
4002  bool SuppressUserConversions = false,
4003  bool PartialOverloading = false,
4004  ConversionSequenceList EarlyConversions = std::nullopt,
4005  OverloadCandidateParamOrder PO = {});
4006  void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl,
4007  DeclAccessPair FoundDecl,
4008  CXXRecordDecl *ActingContext,
4009  TemplateArgumentListInfo *ExplicitTemplateArgs,
4010  QualType ObjectType,
4011  Expr::Classification ObjectClassification,
4012  ArrayRef<Expr *> Args,
4013  OverloadCandidateSet& CandidateSet,
4014  bool SuppressUserConversions = false,
4015  bool PartialOverloading = false,
4016  OverloadCandidateParamOrder PO = {});
4018  FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl,
4019  TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args,
4020  OverloadCandidateSet &CandidateSet, bool SuppressUserConversions = false,
4021  bool PartialOverloading = false, bool AllowExplicit = true,
4022  ADLCallKind IsADLCandidate = ADLCallKind::NotADL,
4023  OverloadCandidateParamOrder PO = {});
4025  FunctionTemplateDecl *FunctionTemplate, ArrayRef<QualType> ParamTypes,
4026  ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet,
4027  ConversionSequenceList &Conversions, bool SuppressUserConversions,
4028  CXXRecordDecl *ActingContext = nullptr, QualType ObjectType = QualType(),
4029  Expr::Classification ObjectClassification = {},
4030  OverloadCandidateParamOrder PO = {});
4032  CXXConversionDecl *Conversion, DeclAccessPair FoundDecl,
4033  CXXRecordDecl *ActingContext, Expr *From, QualType ToType,
4034  OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit,
4035  bool AllowExplicit, bool AllowResultConversion = true);
4037  FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl,
4038  CXXRecordDecl *ActingContext, Expr *From, QualType ToType,
4039  OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit,
4040  bool AllowExplicit, bool AllowResultConversion = true);
4041  void AddSurrogateCandidate(CXXConversionDecl *Conversion,
4042  DeclAccessPair FoundDecl,
4043  CXXRecordDecl *ActingContext,
4044  const FunctionProtoType *Proto,
4045  Expr *Object, ArrayRef<Expr *> Args,
4046  OverloadCandidateSet& CandidateSet);
4048  const UnresolvedSetImpl &Functions, ArrayRef<Expr *> Args,
4049  OverloadCandidateSet &CandidateSet,
4050  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr);
4052  SourceLocation OpLoc, ArrayRef<Expr *> Args,
4053  OverloadCandidateSet &CandidateSet,
4054  OverloadCandidateParamOrder PO = {});
4055  void AddBuiltinCandidate(QualType *ParamTys, ArrayRef<Expr *> Args,
4056  OverloadCandidateSet& CandidateSet,
4057  bool IsAssignmentOperator = false,
4058  unsigned NumContextualBoolArguments = 0);
4060  SourceLocation OpLoc, ArrayRef<Expr *> Args,
4061  OverloadCandidateSet& CandidateSet);
4062  void AddArgumentDependentLookupCandidates(DeclarationName Name,
4063  SourceLocation Loc,
4064  ArrayRef<Expr *> Args,
4065  TemplateArgumentListInfo *ExplicitTemplateArgs,
4066  OverloadCandidateSet& CandidateSet,
4067  bool PartialOverloading = false);
4068 
4069  // Emit as a 'note' the specific overload candidate
4070  void NoteOverloadCandidate(
4071  NamedDecl *Found, FunctionDecl *Fn,
4073  QualType DestType = QualType(), bool TakingAddress = false);
4074 
4075  // Emit as a series of 'note's all template and non-templates identified by
4076  // the expression Expr
4077  void NoteAllOverloadCandidates(Expr *E, QualType DestType = QualType(),
4078  bool TakingAddress = false);
4079 
4080  /// Check the enable_if expressions on the given function. Returns the first
4081  /// failing attribute, or NULL if they were all successful.
4082  EnableIfAttr *CheckEnableIf(FunctionDecl *Function, SourceLocation CallLoc,
4083  ArrayRef<Expr *> Args,
4084  bool MissingImplicitThis = false);
4085 
4086  /// Find the failed Boolean condition within a given Boolean
4087  /// constant expression, and describe it with a string.
4088  std::pair<Expr *, std::string> findFailedBooleanCondition(Expr *Cond);
4089 
4090  /// Emit diagnostics for the diagnose_if attributes on Function, ignoring any
4091  /// non-ArgDependent DiagnoseIfAttrs.
4092  ///
4093  /// Argument-dependent diagnose_if attributes should be checked each time a
4094  /// function is used as a direct callee of a function call.
4095  ///
4096  /// Returns true if any errors were emitted.
4097  bool diagnoseArgDependentDiagnoseIfAttrs(const FunctionDecl *Function,
4098  const Expr *ThisArg,
4099  ArrayRef<const Expr *> Args,
4100  SourceLocation Loc);
4101 
4102  /// Emit diagnostics for the diagnose_if attributes on Function, ignoring any
4103  /// ArgDependent DiagnoseIfAttrs.
4104  ///
4105  /// Argument-independent diagnose_if attributes should be checked on every use
4106  /// of a function.
4107  ///
4108  /// Returns true if any errors were emitted.
4109  bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND,
4110  SourceLocation Loc);
4111 
4112  /// Returns whether the given function's address can be taken or not,
4113  /// optionally emitting a diagnostic if the address can't be taken.
4114  ///
4115  /// Returns false if taking the address of the function is illegal.
4116  bool checkAddressOfFunctionIsAvailable(const FunctionDecl *Function,
4117  bool Complain = false,
4118  SourceLocation Loc = SourceLocation());
4119 
4120  // [PossiblyAFunctionType] --> [Return]
4121  // NonFunctionType --> NonFunctionType
4122  // R (A) --> R(A)
4123  // R (*)(A) --> R (A)
4124  // R (&)(A) --> R (A)
4125  // R (S::*)(A) --> R (A)
4126  QualType ExtractUnqualifiedFunctionType(QualType PossiblyAFunctionType);
4127 
4128  FunctionDecl *
4129  ResolveAddressOfOverloadedFunction(Expr *AddressOfExpr,
4130  QualType TargetType,
4131  bool Complain,
4132  DeclAccessPair &Found,
4133  bool *pHadMultipleCandidates = nullptr);
4134 
4135  FunctionDecl *
4136  resolveAddressOfSingleOverloadCandidate(Expr *E, DeclAccessPair &FoundResult);
4137 
4139  ExprResult &SrcExpr, bool DoFunctionPointerConversion = false);
4140 
4141  FunctionDecl *
4143  bool Complain = false,
4144  DeclAccessPair *Found = nullptr);
4145 
4147  ExprResult &SrcExpr, bool DoFunctionPointerConversion = false,
4148  bool Complain = false, SourceRange OpRangeForComplaining = SourceRange(),
4149  QualType DestTypeForComplaining = QualType(),
4150  unsigned DiagIDForComplaining = 0);
4151 
4152  Expr *FixOverloadedFunctionReference(Expr *E,
4153  DeclAccessPair FoundDecl,
4154  FunctionDecl *Fn);
4156  DeclAccessPair FoundDecl,
4157  FunctionDecl *Fn);
4158 
4159  void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE,
4160  ArrayRef<Expr *> Args,
4161  OverloadCandidateSet &CandidateSet,
4162  bool PartialOverloading = false);
4164  LookupResult &R, TemplateArgumentListInfo *ExplicitTemplateArgs,
4165  ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet);
4166 
4167  // An enum used to represent the different possible results of building a
4168  // range-based for loop.
4173  };
4174 
4176  SourceLocation RangeLoc,
4177  const DeclarationNameInfo &NameInfo,
4178  LookupResult &MemberLookup,
4179  OverloadCandidateSet *CandidateSet,
4180  Expr *Range, ExprResult *CallExpr);
4181 
4183  UnresolvedLookupExpr *ULE,
4184  SourceLocation LParenLoc,
4185  MultiExprArg Args,
4186  SourceLocation RParenLoc,
4187  Expr *ExecConfig,
4188  bool AllowTypoCorrection=true,
4189  bool CalleesAddressIsTaken=false);
4190 
4192  MultiExprArg Args, SourceLocation RParenLoc,
4193  OverloadCandidateSet *CandidateSet,
4194  ExprResult *Result);
4195 
4197  NestedNameSpecifierLoc NNSLoc,
4198  DeclarationNameInfo DNI,
4199  const UnresolvedSetImpl &Fns,
4200  bool PerformADL = true);
4201 
4203  UnaryOperatorKind Opc,
4204  const UnresolvedSetImpl &Fns,
4205  Expr *input, bool RequiresADL = true);
4206 
4207  void LookupOverloadedBinOp(OverloadCandidateSet &CandidateSet,
4209  const UnresolvedSetImpl &Fns,
4210  ArrayRef<Expr *> Args, bool RequiresADL = true);
4212  BinaryOperatorKind Opc,
4213  const UnresolvedSetImpl &Fns,
4214  Expr *LHS, Expr *RHS,
4215  bool RequiresADL = true,
4216  bool AllowRewrittenCandidates = true,
4217  FunctionDecl *DefaultedFn = nullptr);
4219  const UnresolvedSetImpl &Fns,
4220  Expr *LHS, Expr *RHS,
4221  FunctionDecl *DefaultedFn);
4222 
4224  SourceLocation RLoc, Expr *Base,
4225  MultiExprArg Args);
4226 
4228  SourceLocation LParenLoc,
4229  MultiExprArg Args,
4230  SourceLocation RParenLoc,
4231  Expr *ExecConfig = nullptr,
4232  bool IsExecConfig = false,
4233  bool AllowRecovery = false);
4234  ExprResult
4235  BuildCallToObjectOfClassType(Scope *S, Expr *Object, SourceLocation LParenLoc,
4236  MultiExprArg Args,
4237  SourceLocation RParenLoc);
4238 
4240  SourceLocation OpLoc,
4241  bool *NoArrowOperatorFound = nullptr);
4242 
4243  /// CheckCallReturnType - Checks that a call expression's return type is
4244  /// complete. Returns true on failure. The location passed in is the location
4245  /// that best represents the call.
4246  bool CheckCallReturnType(QualType ReturnType, SourceLocation Loc,
4247  CallExpr *CE, FunctionDecl *FD);
4248 
4249  /// Helpers for dealing with blocks and functions.
4251  bool CheckParameterNames);
4255 
4256  /// \name Name lookup
4257  ///
4258  /// These routines provide name lookup that is used during semantic
4259  /// analysis to resolve the various kinds of names (identifiers,
4260  /// overloaded operator names, constructor names, etc.) into zero or
4261  /// more declarations within a particular scope. The major entry
4262  /// points are LookupName, which performs unqualified name lookup,
4263  /// and LookupQualifiedName, which performs qualified name lookup.
4264  ///
4265  /// All name lookup is performed based on some specific criteria,
4266  /// which specify what names will be visible to name lookup and how
4267  /// far name lookup should work. These criteria are important both
4268  /// for capturing language semantics (certain lookups will ignore
4269  /// certain names, for example) and for performance, since name
4270  /// lookup is often a bottleneck in the compilation of C++. Name
4271  /// lookup criteria is specified via the LookupCriteria enumeration.
4272  ///
4273  /// The results of name lookup can vary based on the kind of name
4274  /// lookup performed, the current language, and the translation
4275  /// unit. In C, for example, name lookup will either return nothing
4276  /// (no entity found) or a single declaration. In C++, name lookup
4277  /// can additionally refer to a set of overloaded functions or
4278  /// result in an ambiguity. All of the possible results of name
4279  /// lookup are captured by the LookupResult class, which provides
4280  /// the ability to distinguish among them.
4281  //@{
4282 
4283  /// Describes the kind of name lookup to perform.
4285  /// Ordinary name lookup, which finds ordinary names (functions,
4286  /// variables, typedefs, etc.) in C and most kinds of names
4287  /// (functions, variables, members, types, etc.) in C++.
4289  /// Tag name lookup, which finds the names of enums, classes,
4290  /// structs, and unions.
4292  /// Label name lookup.
4294  /// Member name lookup, which finds the names of
4295  /// class/struct/union members.
4297  /// Look up of an operator name (e.g., operator+) for use with
4298  /// operator overloading. This lookup is similar to ordinary name
4299  /// lookup, but will ignore any declarations that are class members.
4301  /// Look up a name following ~ in a destructor name. This is an ordinary
4302  /// lookup, but prefers tags to typedefs.
4304  /// Look up of a name that precedes the '::' scope resolution
4305  /// operator in C++. This lookup completely ignores operator, object,
4306  /// function, and enumerator names (C++ [basic.lookup.qual]p1).
4308  /// Look up a namespace name within a C++ using directive or
4309  /// namespace alias definition, ignoring non-namespace names (C++
4310  /// [basic.lookup.udir]p1).
4312  /// Look up all declarations in a scope with the given name,
4313  /// including resolved using declarations. This is appropriate
4314  /// for checking redeclarations for a using declaration.
4316  /// Look up an ordinary name that is going to be redeclared as a
4317  /// name with linkage. This lookup ignores any declarations that
4318  /// are outside of the current scope unless they have linkage. See
4319  /// C99 6.2.2p4-5 and C++ [basic.link]p6.
4321  /// Look up a friend of a local class. This lookup does not look
4322  /// outside the innermost non-class scope. See C++11 [class.friend]p11.
4324  /// Look up the name of an Objective-C protocol.
4326  /// Look up implicit 'self' parameter of an objective-c method.
4328  /// Look up the name of an OpenMP user-defined reduction operation.
4330  /// Look up the name of an OpenMP user-defined mapper.
4332  /// Look up any declaration with any name.
4334  };
4335 
4336  /// Specifies whether (or how) name lookup is being performed for a
4337  /// redeclaration (vs. a reference).
4339  /// The lookup is a reference to this name that is not for the
4340  /// purpose of redeclaring the name.
4342  /// The lookup results will be used for redeclaration of a name,
4343  /// if an entity by that name already exists and is visible.
4345  /// The lookup results will be used for redeclaration of a name
4346  /// with external linkage; non-visible lookup results with external linkage
4347  /// may also be found.
4349  };
4350 
4352  // A declaration with an owning module for linkage can never link against
4353  // anything that is not visible. We don't need to check linkage here; if
4354  // the context has internal linkage, redeclaration lookup won't find things
4355  // from other TUs, and we can't safely compute linkage yet in general.
4356  if (cast<Decl>(CurContext)
4357  ->getOwningModuleForLinkage(/*IgnoreLinkage*/true))
4358  return ForVisibleRedeclaration;
4359  return ForExternalRedeclaration;
4360  }
4361 
4362  /// The possible outcomes of name lookup for a literal operator.
4364  /// The lookup resulted in an error.
4366  /// The lookup found no match but no diagnostic was issued.
4368  /// The lookup found a single 'cooked' literal operator, which
4369  /// expects a normal literal to be built and passed to it.
4371  /// The lookup found a single 'raw' literal operator, which expects
4372  /// a string literal containing the spelling of the literal token.
4374  /// The lookup found an overload set of literal operator templates,
4375  /// which expect the characters of the spelling of the literal token to be
4376  /// passed as a non-type template argument pack.
4378  /// The lookup found an overload set of literal operator templates,
4379  /// which expect the character type and characters of the spelling of the
4380  /// string literal token to be passed as template arguments.
4382  };
4383 
4384  SpecialMemberOverloadResult LookupSpecialMember(CXXRecordDecl *D,
4386  bool ConstArg,
4387  bool VolatileArg,
4388  bool RValueThis,
4389  bool ConstThis,
4390  bool VolatileThis);
4391 
4392  typedef std::function<void(const TypoCorrection &)> TypoDiagnosticGenerator;
4393  typedef std::function<ExprResult(Sema &, TypoExpr *, TypoCorrection)>
4395 
4396 private:
4397  bool CppLookupName(LookupResult &R, Scope *S);
4398 
4399  struct TypoExprState {
4400  std::unique_ptr<TypoCorrectionConsumer> Consumer;
4401  TypoDiagnosticGenerator DiagHandler;
4402  TypoRecoveryCallback RecoveryHandler;
4403  TypoExprState();
4404  TypoExprState(TypoExprState &&other) noexcept;
4405  TypoExprState &operator=(TypoExprState &&other) noexcept;
4406  };
4407 
4408  /// The set of unhandled TypoExprs and their associated state.
4409  llvm::MapVector<TypoExpr *, TypoExprState> DelayedTypos;
4410 
4411  /// Creates a new TypoExpr AST node.
4412  TypoExpr *createDelayedTypo(std::unique_ptr<TypoCorrectionConsumer> TCC,
4414  TypoRecoveryCallback TRC, SourceLocation TypoLoc);
4415 
4416  // The set of known/encountered (unique, canonicalized) NamespaceDecls.
4417  //
4418  // The boolean value will be true to indicate that the namespace was loaded
4419  // from an AST/PCH file, or false otherwise.
4420  llvm::MapVector<NamespaceDecl*, bool> KnownNamespaces;
4421 
4422  /// Whether we have already loaded known namespaces from an extenal
4423  /// source.
4424  bool LoadedExternalKnownNamespaces;
4425 
4426  /// Helper for CorrectTypo and CorrectTypoDelayed used to create and
4427  /// populate a new TypoCorrectionConsumer. Returns nullptr if typo correction
4428  /// should be skipped entirely.
4429  std::unique_ptr<TypoCorrectionConsumer>
4430  makeTypoCorrectionConsumer(const DeclarationNameInfo &Typo,
4431  Sema::LookupNameKind LookupKind, Scope *S,
4432  CXXScopeSpec *SS,
4434  DeclContext *MemberContext, bool EnteringContext,
4435  const ObjCObjectPointerType *OPT,
4436  bool ErrorRecovery);
4437 
4438 public:
4439  const TypoExprState &getTypoExprState(TypoExpr *TE) const;
4440 
4441  /// Clears the state of the given TypoExpr.
4442  void clearDelayedTypo(TypoExpr *TE);
4443 
4444  /// Look up a name, looking for a single declaration. Return
4445  /// null if the results were absent, ambiguous, or overloaded.
4446  ///
4447  /// It is preferable to use the elaborated form and explicitly handle
4448  /// ambiguity and overloaded.
4450  SourceLocation Loc,
4451  LookupNameKind NameKind,
4452  RedeclarationKind Redecl
4454  bool LookupBuiltin(LookupResult &R);
4455  void LookupNecessaryTypesForBuiltin(Scope *S, unsigned ID);
4456  bool LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation = false,
4457  bool ForceNoCPlusPlus = false);
4458  bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
4459  bool InUnqualifiedLookup = false);
4460  bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
4461  CXXScopeSpec &SS);
4463  bool AllowBuiltinCreation = false,
4464  bool EnteringContext = false);
4466  RedeclarationKind Redecl
4468  bool LookupInSuper(LookupResult &R, CXXRecordDecl *Class);
4469 
4471  UnresolvedSetImpl &Functions);
4472 
4474  SourceLocation GnuLabelLoc = SourceLocation());
4475 
4479  unsigned Quals);
4480  CXXMethodDecl *LookupCopyingAssignment(CXXRecordDecl *Class, unsigned Quals,
4481  bool RValueThis, unsigned ThisQuals);
4483  unsigned Quals);
4484  CXXMethodDecl *LookupMovingAssignment(CXXRecordDecl *Class, unsigned Quals,
4485  bool RValueThis, unsigned ThisQuals);
4487 
4488  bool checkLiteralOperatorId(const CXXScopeSpec &SS, const UnqualifiedId &Id,
4489  bool IsUDSuffix);
4492  bool AllowRaw, bool AllowTemplate,
4493  bool AllowStringTemplate, bool DiagnoseMissing,
4494  StringLiteral *StringLit = nullptr);
4495  bool isKnownName(StringRef name);
4496 
4497  /// Status of the function emission on the CUDA/HIP/OpenMP host/device attrs.
4499  Emitted,
4500  CUDADiscarded, // Discarded due to CUDA/HIP hostness
4501  OMPDiscarded, // Discarded due to OpenMP hostness
4502  TemplateDiscarded, // Discarded due to uninstantiated templates
4503  Unknown,
4504  };
4506  bool Final = false);
4507 
4508  // Whether the callee should be ignored in CUDA/HIP/OpenMP host/device check.
4510 
4512  ArrayRef<Expr *> Args, ADLResult &Functions);
4513 
4516  bool IncludeGlobalScope = true,
4517  bool LoadExternal = true);
4520  bool IncludeGlobalScope = true,
4521  bool IncludeDependentBases = false,
4522  bool LoadExternal = true);
4523 
4525  CTK_NonError, // CorrectTypo used in a non error recovery situation.
4526  CTK_ErrorRecovery // CorrectTypo used in normal error recovery.
4527  };
4528 
4530  Sema::LookupNameKind LookupKind,
4531  Scope *S, CXXScopeSpec *SS,
4533  CorrectTypoKind Mode,
4534  DeclContext *MemberContext = nullptr,
4535  bool EnteringContext = false,
4536  const ObjCObjectPointerType *OPT = nullptr,
4537  bool RecordFailure = true);
4538 
4540  Sema::LookupNameKind LookupKind, Scope *S,
4541  CXXScopeSpec *SS,
4545  DeclContext *MemberContext = nullptr,
4546  bool EnteringContext = false,
4547  const ObjCObjectPointerType *OPT = nullptr);
4548 
4549  /// Process any TypoExprs in the given Expr and its children,
4550  /// generating diagnostics as appropriate and returning a new Expr if there
4551  /// were typos that were all successfully corrected and ExprError if one or
4552  /// more typos could not be corrected.
4553  ///
4554  /// \param E The Expr to check for TypoExprs.
4555  ///
4556  /// \param InitDecl A VarDecl to avoid because the Expr being corrected is its
4557  /// initializer.
4558  ///
4559  /// \param RecoverUncorrectedTypos If true, when typo correction fails, it
4560  /// will rebuild the given Expr with all TypoExprs degraded to RecoveryExprs.
4561  ///
4562  /// \param Filter A function applied to a newly rebuilt Expr to determine if
4563  /// it is an acceptable/usable result from a single combination of typo
4564  /// corrections. As long as the filter returns ExprError, different
4565  /// combinations of corrections will be tried until all are exhausted.
4567  Expr *E, VarDecl *InitDecl = nullptr,
4568  bool RecoverUncorrectedTypos = false,
4569  llvm::function_ref<ExprResult(Expr *)> Filter =
4570  [](Expr *E) -> ExprResult { return E; });
4571 
4573  ExprResult ER, VarDecl *InitDecl = nullptr,
4574  bool RecoverUncorrectedTypos = false,
4575  llvm::function_ref<ExprResult(Expr *)> Filter =
4576  [](Expr *E) -> ExprResult { return E; }) {
4577  return ER.isInvalid()
4578  ? ER
4579  : CorrectDelayedTyposInExpr(ER.get(), InitDecl,
4580  RecoverUncorrectedTypos, Filter);
4581  }
4582 
4583  void diagnoseTypo(const TypoCorrection &Correction,
4584  const PartialDiagnostic &TypoDiag,
4585  bool ErrorRecovery = true);
4586 
4587  void diagnoseTypo(const TypoCorrection &Correction,
4588  const PartialDiagnostic &TypoDiag,
4589  const PartialDiagnostic &PrevNote,
4590  bool ErrorRecovery = true);
4591 
4592  void MarkTypoCorrectedFunctionDefinition(const NamedDecl *F);
4593 
4594  void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc,
4595  ArrayRef<Expr *> Args,
4596  AssociatedNamespaceSet &AssociatedNamespaces,
4597  AssociatedClassSet &AssociatedClasses);
4598 
4599  void FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S,
4600  bool ConsiderLinkage, bool AllowInlineNamespace);
4601 
4602  bool CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old);
4603  bool CheckRedeclarationExported(NamedDecl *New, NamedDecl *Old);
4604  bool CheckRedeclarationInModule(NamedDecl *New, NamedDecl *Old);
4605  bool IsRedefinitionInModule(const NamedDecl *New,
4606  const NamedDecl *Old) const;
4607 
4608  void DiagnoseAmbiguousLookup(LookupResult &Result);
4609  //@}
4610 
4611  /// Attempts to produce a RecoveryExpr after some AST node cannot be created.
4612  ExprResult CreateRecoveryExpr(SourceLocation Begin, SourceLocation End,
4613  ArrayRef<Expr *> SubExprs,
4614  QualType T = QualType());
4615 
4616  ObjCInterfaceDecl *getObjCInterfaceDecl(IdentifierInfo *&Id,
4617  SourceLocation IdLoc,
4618  bool TypoCorrection = false);
4619  FunctionDecl *CreateBuiltin(IdentifierInfo *II, QualType Type, unsigned ID,
4620  SourceLocation Loc);
4621  NamedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
4622  Scope *S, bool ForRedeclaration,
4623  SourceLocation Loc);
4624  NamedDecl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
4625  Scope *S);
4627  FunctionDecl *FD);
4628  void AddKnownFunctionAttributes(FunctionDecl *FD);
4629 
4630  // More parsing and symbol table subroutines.
4631 
4632  void ProcessPragmaWeak(Scope *S, Decl *D);
4633  // Decl attributes - this routine is the top level dispatcher.
4634  void ProcessDeclAttributes(Scope *S, Decl *D, const Declarator &PD);
4635  // Helper for delayed processing of attributes.
4636  void ProcessDeclAttributeDelayed(Decl *D,
4637  const ParsedAttributesView &AttrList);
4638 
4639  // Options for ProcessDeclAttributeList().
4643 
4645  ProcessDeclAttributeOptions Result = *this;
4646  Result.IncludeCXX11Attributes = Val;
4647  return Result;
4648  }
4649 
4651  ProcessDeclAttributeOptions Result = *this;
4652  Result.IgnoreTypeAttributes = Val;
4653  return Result;
4654  }
4655 
4656  // Should C++11 attributes be processed?
4658 
4659  // Should any type attributes encountered be ignored?
4660  // If this option is false, a diagnostic will be emitted for any type
4661  // attributes of a kind that does not "slide" from the declaration to
4662  // the decl-specifier-seq.
4664  };
4665 
4666  void ProcessDeclAttributeList(Scope *S, Decl *D,
4667  const ParsedAttributesView &AttrList,
4668  const ProcessDeclAttributeOptions &Options =
4671  const ParsedAttributesView &AttrList);
4672 
4674 
4675  /// Handles semantic checking for features that are common to all attributes,
4676  /// such as checking whether a parameter was properly specified, or the
4677  /// correct number of arguments were passed, etc. Returns true if the
4678  /// attribute has been diagnosed.
4679  bool checkCommonAttributeFeatures(const Decl *D, const ParsedAttr &A,
4680  bool SkipArgCountCheck = false);
4681  bool checkCommonAttributeFeatures(const Stmt *S, const ParsedAttr &A,
4682  bool SkipArgCountCheck = false);
4683 
4684  /// Determine if type T is a valid subject for a nonnull and similar
4685  /// attributes. By default, we look through references (the behavior used by
4686  /// nonnull), but if the second parameter is true, then we treat a reference
4687  /// type as valid.
4688  bool isValidPointerAttrType(QualType T, bool RefOkay = false);
4689 
4690  bool CheckRegparmAttr(const ParsedAttr &attr, unsigned &value);
4692  const FunctionDecl *FD = nullptr);
4693  bool CheckAttrTarget(const ParsedAttr &CurrAttr);
4694  bool CheckAttrNoArgs(const ParsedAttr &CurrAttr);
4696  const Expr *E, StringRef &Str,
4697  SourceLocation *ArgLocation = nullptr);
4698  bool checkStringLiteralArgumentAttr(const ParsedAttr &Attr, unsigned ArgNum,
4699  StringRef &Str,
4700  SourceLocation *ArgLocation = nullptr);
4701  llvm::Error isValidSectionSpecifier(StringRef Str);
4702  bool checkSectionName(SourceLocation LiteralLoc, StringRef Str);
4703  bool checkTargetAttr(SourceLocation LiteralLoc, StringRef Str);
4704  bool checkTargetVersionAttr(SourceLocation LiteralLoc, StringRef &Str,
4705  bool &isDefault);
4706  bool
4707  checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str,
4708  const StringLiteral *Literal, bool &HasDefault,
4709  bool &HasCommas, bool &HasNotDefault,
4710  SmallVectorImpl<SmallString<64>> &StringsBuffer);
4712  CXXRecordDecl *RD, SourceRange Range, bool BestCase,
4713  MSInheritanceModel SemanticSpelling);
4714 
4716 
4717  /// Adjust the calling convention of a method to be the ABI default if it
4718  /// wasn't specified explicitly. This handles method types formed from
4719  /// function type typedefs and typename template arguments.
4720  void adjustMemberFunctionCC(QualType &T, bool IsStatic, bool IsCtorOrDtor,
4721  SourceLocation Loc);
4722 
4723  // Check if there is an explicit attribute, but only look through parens.
4724  // The intent is to look for an attribute on the current declarator, but not
4725  // one that came from a typedef.
4727 
4728  /// Get the outermost AttributedType node that sets a calling convention.
4729  /// Valid types should not have multiple attributes with different CCs.
4731 
4732  /// Process the attributes before creating an attributed statement. Returns
4733  /// the semantic attributes that have been processed.
4734  void ProcessStmtAttributes(Stmt *Stmt, const ParsedAttributes &InAttrs,
4735  SmallVectorImpl<const Attr *> &OutAttrs);
4736 
4738  ObjCMethodDecl *MethodDecl,
4739  bool IsProtocolMethodDecl);
4740 
4742  ObjCMethodDecl *Overridden,
4743  bool IsProtocolMethodDecl);
4744 
4745  /// WarnExactTypedMethods - This routine issues a warning if method
4746  /// implementation declaration matches exactly that of its declaration.
4748  ObjCMethodDecl *MethodDecl,
4749  bool IsProtocolMethodDecl);
4750 
4752 
4753  /// CheckImplementationIvars - This routine checks if the instance variables
4754  /// listed in the implelementation match those listed in the interface.
4756  ObjCIvarDecl **Fields, unsigned nIvars,
4757  SourceLocation Loc);
4758 
4759  /// ImplMethodsVsClassMethods - This is main routine to warn if any method
4760  /// remains unimplemented in the class or category \@implementation.
4761  void ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl,
4762  ObjCContainerDecl* IDecl,
4763  bool IncompleteImpl = false);
4764 
4765  /// DiagnoseUnimplementedProperties - This routine warns on those properties
4766  /// which must be implemented by this implementation.
4768  ObjCContainerDecl *CDecl,
4769  bool SynthesizeProperties);
4770 
4771  /// Diagnose any null-resettable synthesized setters.
4773 
4774  /// DefaultSynthesizeProperties - This routine default synthesizes all
4775  /// properties which must be synthesized in the class's \@implementation.
4777  ObjCInterfaceDecl *IDecl,
4778  SourceLocation AtEnd);
4780 
4781  /// IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is
4782  /// an ivar synthesized for 'Method' and 'Method' is a property accessor
4783  /// declared in class 'IFace'.
4785  ObjCMethodDecl *Method, ObjCIvarDecl *IV);
4786 
4787  /// DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which
4788  /// backs the property is not used in the property's accessor.
4790  const ObjCImplementationDecl *ImplD);
4791 
4792  /// GetIvarBackingPropertyAccessor - If method is a property setter/getter and
4793  /// it property has a backing ivar, returns this ivar; otherwise, returns NULL.
4794  /// It also returns ivar's property on success.
4796  const ObjCPropertyDecl *&PDecl) const;
4797 
4798  /// Called by ActOnProperty to handle \@property declarations in
4799  /// class extensions.
4801  SourceLocation AtLoc,
4802  SourceLocation LParenLoc,
4803  FieldDeclarator &FD,
4804  Selector GetterSel,
4805  SourceLocation GetterNameLoc,
4806  Selector SetterSel,
4807  SourceLocation SetterNameLoc,
4808  const bool isReadWrite,
4809  unsigned &Attributes,
4810  const unsigned AttributesAsWritten,
4811  QualType T,
4812  TypeSourceInfo *TSI,
4813  tok::ObjCKeywordKind MethodImplKind);
4814 
4815  /// Called by ActOnProperty and HandlePropertyInClassExtension to
4816  /// handle creating the ObjcPropertyDecl for a category or \@interface.
4818  ObjCContainerDecl *CDecl,
4819  SourceLocation AtLoc,
4820  SourceLocation LParenLoc,
4821  FieldDeclarator &FD,
4822  Selector GetterSel,
4823  SourceLocation GetterNameLoc,
4824  Selector SetterSel,
4825  SourceLocation SetterNameLoc,
4826  const bool isReadWrite,
4827  const unsigned Attributes,
4828  const unsigned AttributesAsWritten,
4829  QualType T,
4830  TypeSourceInfo *TSI,
4831  tok::ObjCKeywordKind MethodImplKind,
4832  DeclContext *lexicalDC = nullptr);
4833 
4834  /// AtomicPropertySetterGetterRules - This routine enforces the rule (via
4835  /// warning) when atomic property has one but not the other user-declared
4836  /// setter or getter.
4838  ObjCInterfaceDecl* IDecl);
4839 
4841 
4843  const ObjCImplementationDecl *ImplD,
4844  const ObjCInterfaceDecl *IFD);
4845 
4847 
4851  };
4852 
4853  /// MatchTwoMethodDeclarations - Checks if two methods' type match and returns
4854  /// true, or false, accordingly.
4855  bool MatchTwoMethodDeclarations(const ObjCMethodDecl *Method,
4856  const ObjCMethodDecl *PrevMethod,
4857  MethodMatchStrategy strategy = MMS_strict);
4858 
4859  /// MatchAllMethodDeclarations - Check methods declaraed in interface or
4860  /// or protocol against those declared in their implementations.
4861  void MatchAllMethodDeclarations(const SelectorSet &InsMap,
4862  const SelectorSet &ClsMap,
4863  SelectorSet &InsMapSeen,
4864  SelectorSet &ClsMapSeen,
4865  ObjCImplDecl* IMPDecl,
4866  ObjCContainerDecl* IDecl,
4867  bool &IncompleteImpl,
4868  bool ImmediateClass,
4869  bool WarnCategoryMethodImpl=false);
4870 
4871  /// CheckCategoryVsClassMethodMatches - Checks that methods implemented in
4872  /// category matches with those implemented in its primary class and
4873  /// warns each time an exact match is found.
4875 
4876  /// Add the given method to the list of globally-known methods.
4878 
4879  /// Returns default addr space for method qualifiers.
4881 
4882 private:
4883  /// AddMethodToGlobalPool - Add an instance or factory method to the global
4884  /// pool. See descriptoin of AddInstanceMethodToGlobalPool.
4885  void AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, bool instance);
4886 
4887  /// LookupMethodInGlobalPool - Returns the instance or factory method and
4888  /// optionally warns if there are multiple signatures.
4889  ObjCMethodDecl *LookupMethodInGlobalPool(Selector Sel, SourceRange R,
4890  bool receiverIdOrClass,
4891  bool instance);
4892 
4893 public:
4894  /// - Returns instance or factory methods in global method pool for
4895  /// given selector. It checks the desired kind first, if none is found, and
4896  /// parameter checkTheOther is set, it then checks the other kind. If no such
4897  /// method or only one method is found, function returns false; otherwise, it
4898  /// returns true.
4899  bool
4902  bool InstanceFirst, bool CheckTheOther,
4903  const ObjCObjectType *TypeBound = nullptr);
4904 
4905  bool
4907  SourceRange R, bool receiverIdOrClass,
4909 
4910  void
4912  Selector Sel, SourceRange R,
4913  bool receiverIdOrClass);
4914 
4915 private:
4916  /// - Returns a selector which best matches given argument list or
4917  /// nullptr if none could be found
4918  ObjCMethodDecl *SelectBestMethod(Selector Sel, MultiExprArg Args,
4919  bool IsInstance,
4921 
4922 
4923  /// Record the typo correction failure and return an empty correction.
4924  TypoCorrection FailedCorrection(IdentifierInfo *Typo, SourceLocation TypoLoc,
4925  bool RecordFailure = true) {
4926  if (RecordFailure)
4927  TypoCorrectionFailures[Typo].insert(TypoLoc);
4928  return TypoCorrection();
4929  }
4930 
4931 public:
4932  /// AddInstanceMethodToGlobalPool - All instance methods in a translation
4933  /// unit are added to a global pool. This allows us to efficiently associate
4934  /// a selector with a method declaraation for purposes of typechecking
4935  /// messages sent to "id" (where the class of the object is unknown).
4936  void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false) {
4937  AddMethodToGlobalPool(Method, impl, /*instance*/true);
4938  }
4939 
4940  /// AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
4941  void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false) {
4942  AddMethodToGlobalPool(Method, impl, /*instance*/false);
4943  }
4944 
4945  /// AddAnyMethodToGlobalPool - Add any method, instance or factory to global
4946  /// pool.
4947  void AddAnyMethodToGlobalPool(Decl *D);
4948 
4949  /// LookupInstanceMethodInGlobalPool - Returns the method and warns if
4950  /// there are multiple signatures.
4952  bool receiverIdOrClass=false) {
4953  return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
4954  /*instance*/true);
4955  }
4956 
4957  /// LookupFactoryMethodInGlobalPool - Returns the method and warns if
4958  /// there are multiple signatures.
4960  bool receiverIdOrClass=false) {
4961  return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
4962  /*instance*/false);
4963  }
4964 
4966  QualType ObjectType=QualType());
4967  /// LookupImplementedMethodInGlobalPool - Returns the method which has an
4968  /// implementation.
4970 
4971  /// CollectIvarsToConstructOrDestruct - Collect those ivars which require
4972  /// initialization.
4975 
4976  //===--------------------------------------------------------------------===//
4977  // Statement Parsing Callbacks: SemaStmt.cpp.
4978 public:
4979  class FullExprArg {
4980  public:
4981  FullExprArg() : E(nullptr) { }
4982  FullExprArg(Sema &actions) : E(nullptr) { }
4983 
4985  return E;
4986  }
4987 
4988  Expr *get() const { return E; }
4989 
4991  return E;
4992  }
4993 
4994  private:
4995  // FIXME: No need to make the entire Sema class a friend when it's just
4996  // Sema::MakeFullExpr that needs access to the constructor below.
4997  friend class Sema;
4998 
4999  explicit FullExprArg(Expr *expr) : E(expr) {}
5000 
5001  Expr *E;
5002  };
5003 
5005  return MakeFullExpr(Arg, Arg ? Arg->getExprLoc() : SourceLocation());
5006  }
5008  return FullExprArg(
5009  ActOnFinishFullExpr(Arg, CC, /*DiscardedValue*/ false).get());
5010  }
5012  ExprResult FE =
5013  ActOnFinishFullExpr(Arg, Arg ? Arg->getExprLoc() : SourceLocation(),
5014  /*DiscardedValue*/ true);
5015  return FullExprArg(FE.get());
5016  }
5017 
5018  StmtResult ActOnExprStmt(ExprResult Arg, bool DiscardedValue = true);
5020 
5022  bool HasLeadingEmptyMacro = false);
5023 
5024  void ActOnStartOfCompoundStmt(bool IsStmtExpr);
5028  ArrayRef<Stmt *> Elts, bool isStmtExpr);
5029 
5030  /// A RAII object to enter scope of a compound statement.
5032  public:
5033  CompoundScopeRAII(Sema &S, bool IsStmtExpr = false) : S(S) {
5034  S.ActOnStartOfCompoundStmt(IsStmtExpr);
5035  }
5036 
5038  S.ActOnFinishOfCompoundStmt();
5039  }
5040 
5041  private:
5042  Sema &S;
5043  };
5044 
5045  /// An RAII helper that pops function a function scope on exit.
5048  bool Active;
5051  if (Active)
5053  }
5054  void disable() { Active = false; }
5055  };
5056 
5058  SourceLocation StartLoc,
5059  SourceLocation EndLoc);
5064  SourceLocation DotDotDotLoc, ExprResult RHS,
5065  SourceLocation ColonLoc);
5066  void ActOnCaseStmtBody(Stmt *CaseStmt, Stmt *SubStmt);
5067 
5069  SourceLocation ColonLoc,
5070  Stmt *SubStmt, Scope *CurScope);
5072  SourceLocation ColonLoc, Stmt *SubStmt);
5073 
5075  ArrayRef<const Attr *> Attrs, Stmt *SubStmt);
5077  Stmt *SubStmt);
5078 
5079  class ConditionResult;
5080 
5082  SourceLocation LParenLoc, Stmt *InitStmt,
5083  ConditionResult Cond, SourceLocation RParenLoc,
5084  Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal);
5086  SourceLocation LParenLoc, Stmt *InitStmt,
5087  ConditionResult Cond, SourceLocation RParenLoc,
5088  Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal);
5090  SourceLocation LParenLoc, Stmt *InitStmt,
5091  ConditionResult Cond,
5092  SourceLocation RParenLoc);
5094  Stmt *Switch, Stmt *Body);
5096  ConditionResult Cond, SourceLocation RParenLoc,
5097  Stmt *Body);
5099  SourceLocation WhileLoc, SourceLocation CondLParen,
5100  Expr *Cond, SourceLocation CondRParen);
5101 
5103  SourceLocation LParenLoc,
5104  Stmt *First,
5105  ConditionResult Second,
5106  FullExprArg Third,
5107  SourceLocation RParenLoc,
5108  Stmt *Body);
5110  Expr *collection);
5112  Stmt *First, Expr *collection,
5113  SourceLocation RParenLoc);
5114  StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body);
5115 
5117  /// Initial building of a for-range statement.
5119  /// Instantiation or recovery rebuild of a for-range statement. Don't
5120  /// attempt any typo-correction.
5122  /// Determining whether a for-range statement could be built. Avoid any
5123  /// unnecessary or irreversible actions.
5125  };
5126 
5128  SourceLocation CoawaitLoc,
5129  Stmt *InitStmt,
5130  Stmt *LoopVar,
5131  SourceLocation ColonLoc, Expr *Collection,
5132  SourceLocation RParenLoc,
5135  SourceLocation CoawaitLoc,
5136  Stmt *InitStmt,
5137  SourceLocation ColonLoc,
5138  Stmt *RangeDecl, Stmt *Begin, Stmt *End,
5139  Expr *Cond, Expr *Inc,
5140  Stmt *LoopVarDecl,
5141  SourceLocation RParenLoc,
5143  StmtResult FinishCXXForRangeStmt(Stmt *ForRange, Stmt *Body);
5144 
5146  SourceLocation LabelLoc,
5147  LabelDecl *TheDecl);
5149  SourceLocation StarLoc,
5150  Expr *DestExp);
5151  StmtResult ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope);
5152  StmtResult ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope);
5153 
5154  void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope,
5155  CapturedRegionKind Kind, unsigned NumParams);
5156  typedef std::pair<StringRef, QualType> CapturedParamNameType;
5157  void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope,
5160  unsigned OpenMPCaptureLevel = 0);
5162  void ActOnCapturedRegionError();
5164  SourceLocation Loc,
5165  unsigned NumParams);
5166 
5169 
5172 
5173  bool isMoveEligible() const { return S != None; };
5174  bool isCopyElidable() const { return S == MoveEligibleAndCopyElidable; }
5175  };
5177  NamedReturnInfo getNamedReturnInfo(
5179  NamedReturnInfo getNamedReturnInfo(const VarDecl *VD);
5180  const VarDecl *getCopyElisionCandidate(NamedReturnInfo &Info,
5181  QualType ReturnType);
5182 
5183  ExprResult
5185  const NamedReturnInfo &NRInfo, Expr *Value,
5186  bool SupressSimplerImplicitMoves = false);
5187 
5188  StmtResult ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp,
5189  Scope *CurScope);
5190  StmtResult BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp,
5191  bool AllowRecovery = false);
5192  StmtResult ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp,
5193  NamedReturnInfo &NRInfo,
5194  bool SupressSimplerImplicitMoves);
5195 
5196  StmtResult ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple,
5197  bool IsVolatile, unsigned NumOutputs,
5198  unsigned NumInputs, IdentifierInfo **Names,
5199  MultiExprArg Constraints, MultiExprArg Exprs,
5200  Expr *AsmString, MultiExprArg Clobbers,
5201  unsigned NumLabels,
5202  SourceLocation RParenLoc);
5203 
5205  llvm::InlineAsmIdentifierInfo &Info);
5207  SourceLocation TemplateKWLoc,
5208  UnqualifiedId &Id,
5209  bool IsUnevaluatedContext);
5210  bool LookupInlineAsmField(StringRef Base, StringRef Member,
5211  unsigned &Offset, SourceLocation AsmLoc);
5212  ExprResult LookupInlineAsmVarDeclField(Expr *RefExpr, StringRef Member,
5213  SourceLocation AsmLoc);
5215  ArrayRef<Token> AsmToks,
5216  StringRef AsmString,
5217  unsigned NumOutputs, unsigned NumInputs,
5218  ArrayRef<StringRef> Constraints,
5219  ArrayRef<StringRef> Clobbers,
5220  ArrayRef<Expr*> Exprs,
5221  SourceLocation EndLoc);
5222  LabelDecl *GetOrCreateMSAsmLabel(StringRef ExternalLabelName,
5223  SourceLocation Location,
5224  bool AlwaysCreate);
5225 
5226  VarDecl *BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType ExceptionType,
5227  SourceLocation StartLoc,
5229  bool Invalid = false);
5230 
5232 
5234  Decl *Parm, Stmt *Body);
5235 
5237 
5239  MultiStmtArg Catch, Stmt *Finally);
5240 
5243  Scope *CurScope);
5245  Expr *operand);
5247  Expr *SynchExpr,
5248  Stmt *SynchBody);
5249 
5251 
5253  SourceLocation StartLoc,
5254  SourceLocation IdLoc,
5255  IdentifierInfo *Id);
5256 
5258 
5260  Decl *ExDecl, Stmt *HandlerBlock);
5261  StmtResult ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock,
5262  ArrayRef<Stmt *> Handlers);
5263 
5264  StmtResult ActOnSEHTryBlock(bool IsCXXTry, // try (true) or __try (false) ?
5265  SourceLocation TryLoc, Stmt *TryBlock,
5266  Stmt *Handler);
5268  Expr *FilterExpr,
5269  Stmt *Block);
5274 
5276 
5277  bool ShouldWarnIfUnusedFileScopedDecl(const DeclaratorDecl *D) const;
5278 
5279  /// If it's a file scoped decl that must warn if not used, keep track
5280  /// of it.
5282 
5283  typedef llvm::function_ref<void(SourceLocation Loc, PartialDiagnostic PD)>
5285 
5286  /// DiagnoseUnusedExprResult - If the statement passed in is an expression
5287  /// whose result is unused, warn.
5288  void DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID);
5291  DiagReceiverTy DiagReceiver);
5292  void DiagnoseUnusedDecl(const NamedDecl *ND);
5293  void DiagnoseUnusedDecl(const NamedDecl *ND, DiagReceiverTy DiagReceiver);
5294 
5295  /// If VD is set but not otherwise used, diagnose, for a parameter or a
5296  /// variable.
5297  void DiagnoseUnusedButSetDecl(const VarDecl *VD, DiagReceiverTy DiagReceiver);
5298 
5299  /// Emit \p DiagID if statement located on \p StmtLoc has a suspicious null
5300  /// statement as a \p Body, and it is located on the same line.
5301  ///
5302  /// This helps prevent bugs due to typos, such as:
5303  /// if (condition);
5304  /// do_stuff();
5306  const Stmt *Body,
5307  unsigned DiagID);
5308 
5309  /// Warn if a for/while loop statement \p S, which is followed by
5310  /// \p PossibleBody, has a suspicious null statement as a body.
5311  void DiagnoseEmptyLoopBody(const Stmt *S,
5312  const Stmt *PossibleBody);
5313 
5314  /// Warn if a value is moved to itself.
5315  void DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr,
5316  SourceLocation OpLoc);
5317 
5318  /// Returns a field in a CXXRecordDecl that has the same name as the decl \p
5319  /// SelfAssigned when inside a CXXMethodDecl.
5320  const FieldDecl *
5321  getSelfAssignmentClassMemberCandidate(const ValueDecl *SelfAssigned);
5322 
5323  /// Warn if we're implicitly casting from a _Nullable pointer type to a
5324  /// _Nonnull one.
5326  SourceLocation Loc);
5327 
5328  /// Warn when implicitly casting 0 to nullptr.
5330 
5332  return DelayedDiagnostics.push(pool);
5333  }
5335 
5338  ParsingClassDepth++;
5340  }
5342  ParsingClassDepth--;
5344  }
5345 
5347 
5349  const ObjCInterfaceDecl *UnknownObjCClass,
5350  bool ObjCPropertyAccess,
5351  bool AvoidPartialAvailabilityChecks = false,
5352  ObjCInterfaceDecl *ClassReceiver = nullptr);
5353 
5355  UnavailableAttr::ImplicitReason reason);
5356 
5357  /// Issue any -Wunguarded-availability warnings in \c FD
5359 
5361 
5362  //===--------------------------------------------------------------------===//
5363  // Expression Parsing Callbacks: SemaExpr.cpp.
5364 
5365  bool CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid);
5366  // A version of DiagnoseUseOfDecl that should be used if overload resolution
5367  // has been used to find this declaration, which means we don't have to bother
5368  // checking the trailing requires clause.
5370  return DiagnoseUseOfDecl(
5371  D, Loc, /*UnknownObjCClass=*/nullptr, /*ObjCPropertyAccess=*/false,
5372  /*AvoidPartialAvailabilityChecks=*/false, /*ClassReceiver=*/nullptr,
5373  /*SkipTrailingRequiresClause=*/true);
5374  }
5375 
5377  const ObjCInterfaceDecl *UnknownObjCClass = nullptr,
5378  bool ObjCPropertyAccess = false,
5379  bool AvoidPartialAvailabilityChecks = false,
5380  ObjCInterfaceDecl *ClassReciever = nullptr,
5381  bool SkipTrailingRequiresClause = false);
5385  ObjCMethodDecl *Getter,
5386  SourceLocation Loc);
5388  ArrayRef<Expr *> Args);
5389 
5391  ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl = nullptr,
5400 
5402 
5406 
5409 
5411 
5412  // Functions for marking a declaration referenced. These functions also
5413  // contain the relevant logic for marking if a reference to a function or
5414  // variable is an odr-use (in the C++11 sense). There are separate variants
5415  // for expressions referring to a decl; these exist because odr-use marking
5416  // needs to be delayed for some constant variables when we build one of the
5417  // named expressions.
5418  //
5419  // MightBeOdrUse indicates whether the use could possibly be an odr-use, and
5420  // should usually be true. This only needs to be set to false if the lack of
5421  // odr-use cannot be determined from the current context (for instance,
5422  // because the name denotes a virtual function and was written without an
5423  // explicit nested-name-specifier).
5424  void MarkAnyDeclReferenced(SourceLocation Loc, Decl *D, bool MightBeOdrUse);
5426  bool MightBeOdrUse = true);
5428  void MarkDeclRefReferenced(DeclRefExpr *E, const Expr *Base = nullptr);
5432  unsigned CapturingScopeIndex);
5433 
5435  void CleanupVarDeclMarking();
5436 
5439  };
5440 
5441  /// Try to capture the given variable.
5442  ///
5443  /// \param Var The variable to capture.
5444  ///
5445  /// \param Loc The location at which the capture occurs.
5446  ///
5447  /// \param Kind The kind of capture, which may be implicit (for either a
5448  /// block or a lambda), or explicit by-value or by-reference (for a lambda).
5449  ///
5450  /// \param EllipsisLoc The location of the ellipsis, if one is provided in
5451  /// an explicit lambda capture.
5452  ///
5453  /// \param BuildAndDiagnose Whether we are actually supposed to add the
5454  /// captures or diagnose errors. If false, this routine merely check whether
5455  /// the capture can occur without performing the capture itself or complaining
5456  /// if the variable cannot be captured.
5457  ///
5458  /// \param CaptureType Will be set to the type of the field used to capture
5459  /// this variable in the innermost block or lambda. Only valid when the
5460  /// variable can be captured.
5461  ///
5462  /// \param DeclRefType Will be set to the type of a reference to the capture
5463  /// from within the current scope. Only valid when the variable can be
5464  /// captured.
5465  ///
5466  /// \param FunctionScopeIndexToStopAt If non-null, it points to the index
5467  /// of the FunctionScopeInfo stack beyond which we do not attempt to capture.
5468  /// This is useful when enclosing lambdas must speculatively capture
5469  /// variables that may or may not be used in certain specializations of
5470  /// a nested generic lambda.
5471  ///
5472  /// \returns true if an error occurred (i.e., the variable cannot be
5473  /// captured) and false if the capture succeeded.
5475  TryCaptureKind Kind, SourceLocation EllipsisLoc,
5476  bool BuildAndDiagnose, QualType &CaptureType,
5477  QualType &DeclRefType,
5478  const unsigned *const FunctionScopeIndexToStopAt);
5479 
5480  /// Try to capture the given variable.
5483  SourceLocation EllipsisLoc = SourceLocation());
5484 
5485  /// Checks if the variable must be captured.
5487 
5488  /// Given a variable, determine the type that a reference to that
5489  /// variable will have in the given scope.
5491 
5492  /// Mark all of the declarations referenced within a particular AST node as
5493  /// referenced. Used when template instantiation instantiates a non-dependent
5494  /// type -- entities referenced by the type are now referenced.
5497  Expr *E, bool SkipLocalVariables = false,
5498  ArrayRef<const Expr *> StopAt = std::nullopt);
5499 
5500  /// Try to recover by turning the given expression into a
5501  /// call. Returns true if recovery was attempted or an error was
5502  /// emitted; this may also leave the ExprResult invalid.
5504  bool ForceComplain = false,
5505  bool (*IsPlausibleResult)(QualType) = nullptr);
5506 
5507  /// Figure out if an expression could be turned into a call.
5508  bool tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy,
5509  UnresolvedSetImpl &NonTemplateOverloads);
5510 
5511  /// Try to convert an expression \p E to type \p Ty. Returns the result of the
5512  /// conversion.
5514 
5515  /// Conditionally issue a diagnostic based on the statements's reachability
5516  /// analysis.
5517  ///
5518  /// \param Stmts If Stmts is non-empty, delay reporting the diagnostic until
5519  /// the function body is parsed, and then do a basic reachability analysis to
5520  /// determine if the statement is reachable. If it is unreachable, the
5521  /// diagnostic will not be emitted.
5523  const PartialDiagnostic &PD);
5524 
5525  /// Conditionally issue a diagnostic based on the current
5526  /// evaluation context.
5527  ///
5528  /// \param Statement If Statement is non-null, delay reporting the
5529  /// diagnostic until the function body is parsed, and then do a basic
5530  /// reachability analysis to determine if the statement is reachable.
5531  /// If it is unreachable, the diagnostic will not be emitted.
5532  bool DiagRuntimeBehavior(SourceLocation Loc, const Stmt *Statement,
5533  const PartialDiagnostic &PD);
5534  /// Similar, but diagnostic is only produced if all the specified statements
5535  /// are reachable.
5537  const PartialDiagnostic &PD);
5538 
5539  // Primary Expressions.
5540  SourceRange getExprRange(Expr *E) const;
5541 
5543  Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
5544  UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand,
5545  CorrectionCandidateCallback *CCC = nullptr,
5546  bool IsInlineAsmIdentifier = false, Token *KeywordReplacement = nullptr);
5547 
5549  TemplateArgumentListInfo &Buffer,
5550  DeclarationNameInfo &NameInfo,
5551  const TemplateArgumentListInfo *&TemplateArgs);
5552 
5554 
5555  bool
5558  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr,
5559  ArrayRef<Expr *> Args = std::nullopt,
5560  TypoExpr **Out = nullptr);
5561 
5563  IdentifierInfo *II);
5565 
5567  IdentifierInfo *II,
5568  bool AllowBuiltinCreation=false);
5569 
5571  SourceLocation TemplateKWLoc,
5572  const DeclarationNameInfo &NameInfo,
5573  bool isAddressOfOperand,
5574  const TemplateArgumentListInfo *TemplateArgs);
5575 
5576  /// If \p D cannot be odr-used in the current expression evaluation context,
5577  /// return a reason explaining why. Otherwise, return NOUR_None.
5579 
5581  SourceLocation Loc,
5582  const CXXScopeSpec *SS = nullptr);
5583  DeclRefExpr *
5585  const DeclarationNameInfo &NameInfo,
5586  const CXXScopeSpec *SS = nullptr,
5587  NamedDecl *FoundD = nullptr,
5588  SourceLocation TemplateKWLoc = SourceLocation(),
5589  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5590  DeclRefExpr *
5592  const DeclarationNameInfo &NameInfo,
5594  NamedDecl *FoundD = nullptr,
5595  SourceLocation TemplateKWLoc = SourceLocation(),
5596  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5597 
5598  ExprResult
5600  const CXXScopeSpec &SS,
5601  SourceLocation nameLoc,
5602  IndirectFieldDecl *indirectField,
5603  DeclAccessPair FoundDecl = DeclAccessPair::make(nullptr, AS_none),
5604  Expr *baseObjectExpr = nullptr,
5605  SourceLocation opLoc = SourceLocation());
5606 
5608  const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R,
5609  const TemplateArgumentListInfo *TemplateArgs, const Scope *S,
5610  UnresolvedLookupExpr *AsULE = nullptr);
5612  SourceLocation TemplateKWLoc,
5613  LookupResult &R,
5614  const TemplateArgumentListInfo *TemplateArgs,
5615  bool IsDefiniteInstance,
5616  const Scope *S);
5618  const LookupResult &R,
5619  bool HasTrailingLParen);
5620 
5621  ExprResult
5623  const DeclarationNameInfo &NameInfo,
5624  bool IsAddressOfOperand, const Scope *S,
5625  TypeSourceInfo **RecoveryTSI = nullptr);
5626 
5628  SourceLocation TemplateKWLoc,
5629  const DeclarationNameInfo &NameInfo,
5630  const TemplateArgumentListInfo *TemplateArgs);
5631 
5633  LookupResult &R,
5634  bool NeedsADL,
5635  bool AcceptInvalidDecl = false);
5637  const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D,
5638  NamedDecl *FoundD = nullptr,
5639  const TemplateArgumentListInfo *TemplateArgs = nullptr,
5640  bool AcceptInvalidDecl = false);
5641 
5643  DeclarationNameInfo &SuffixInfo,
5644  ArrayRef<Expr *> Args,
5645  SourceLocation LitEndLoc,
5646  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr);
5647 
5652 
5654  SourceLocation LParen,
5655  SourceLocation RParen,
5656  TypeSourceInfo *TSI);
5658  SourceLocation LParen,
5659  SourceLocation RParen,
5660  ParsedType ParsedTy);
5661 
5662  bool CheckLoopHintExpr(Expr *E, SourceLocation Loc);
5663 
5664  ExprResult ActOnNumericConstant(const Token &Tok, Scope *UDLScope = nullptr);
5666  Scope *UDLScope = nullptr);
5669  SourceLocation R,
5670  MultiExprArg Val);
5671 
5672  /// ActOnStringLiteral - The specified tokens were lexed as pasted string
5673  /// fragments (e.g. "foo" "bar" L"baz").
5675  Scope *UDLScope = nullptr);
5676 
5678  SourceLocation DefaultLoc,
5679  SourceLocation RParenLoc,
5680  Expr *ControllingExpr,
5681  ArrayRef<ParsedType> ArgTypes,
5682  ArrayRef<Expr *> ArgExprs);
5684  SourceLocation DefaultLoc,
5685  SourceLocation RParenLoc,
5686  Expr *ControllingExpr,
5688  ArrayRef<Expr *> Exprs);
5689 
5690  // Binary/Unary Operators. 'Tok' is the token for the operator.
5692  Expr *InputExpr, bool IsAfterAmp = false);
5694  Expr *Input, bool IsAfterAmp = false);
5696  Expr *Input, bool IsAfterAmp = false);
5697 
5698  bool isQualifiedMemberAccess(Expr *E);
5700 
5701  bool CheckTypeTraitArity(unsigned Arity, SourceLocation Loc, size_t N);
5702 
5704  SourceLocation OpLoc,
5705  UnaryExprOrTypeTrait ExprKind,
5706  SourceRange R);
5708  UnaryExprOrTypeTrait ExprKind);
5709  ExprResult
5711  UnaryExprOrTypeTrait ExprKind,
5712  bool IsType, void *TyOrEx,
5713  SourceRange ArgRange);
5714 
5716  bool CheckVecStepExpr(Expr *E);
5717 
5720  SourceRange ExprRange,
5721  UnaryExprOrTypeTrait ExprKind);
5723  SourceLocation OpLoc,
5724  IdentifierInfo &Name,
5725  SourceLocation NameLoc,
5726  SourceLocation RParenLoc);
5728  tok::TokenKind Kind, Expr *Input);
5729 
5731  MultiExprArg ArgExprs,
5732  SourceLocation RLoc);
5734  Expr *Idx, SourceLocation RLoc);
5735 
5737  Expr *ColumnIdx,
5738  SourceLocation RBLoc);
5739 
5741  Expr *LowerBound,
5742  SourceLocation ColonLocFirst,
5743  SourceLocation ColonLocSecond,
5744  Expr *Length, Expr *Stride,
5745  SourceLocation RBLoc);
5747  SourceLocation RParenLoc,
5748  ArrayRef<Expr *> Dims,
5749  ArrayRef<SourceRange> Brackets);
5750 
5751  /// Data structure for iterator expression.
5760  };
5761 
5763  SourceLocation LLoc, SourceLocation RLoc,
5765 
5766  // This struct is for use by ActOnMemberAccess to allow
5767  // BuildMemberReferenceExpr to be able to reinvoke ActOnMemberAccess after
5768  // changing the access operator from a '.' to a '->' (to see if that is the
5769  // change needed to fix an error about an unknown member, e.g. when the class
5770  // defines a custom operator->).
5775  };
5776 
5778  Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow,
5779  CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
5780  NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo,
5781  const TemplateArgumentListInfo *TemplateArgs,
5782  const Scope *S,
5783  ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
5784 
5785  ExprResult
5787  bool IsArrow, const CXXScopeSpec &SS,
5788  SourceLocation TemplateKWLoc,
5789  NamedDecl *FirstQualifierInScope, LookupResult &R,
5790  const TemplateArgumentListInfo *TemplateArgs,
5791  const Scope *S,
5792  bool SuppressQualifierCheck = false,
5793  ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
5794 
5795  ExprResult BuildFieldReferenceExpr(Expr *BaseExpr, bool IsArrow,
5796  SourceLocation OpLoc,
5797  const CXXScopeSpec &SS, FieldDecl *Field,
5798  DeclAccessPair FoundDecl,
5799  const DeclarationNameInfo &MemberNameInfo);
5800 
5802 
5803  bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType,
5804  const CXXScopeSpec &SS,
5805  const LookupResult &R);
5806 
5808  bool IsArrow, SourceLocation OpLoc,
5809  const CXXScopeSpec &SS,
5810  SourceLocation TemplateKWLoc,
5811  NamedDecl *FirstQualifierInScope,
5812  const DeclarationNameInfo &NameInfo,
5813  const TemplateArgumentListInfo *TemplateArgs);
5814 
5816  SourceLocation OpLoc,
5817  tok::TokenKind OpKind,
5818  CXXScopeSpec &SS,
5819  SourceLocation TemplateKWLoc,
5820  UnqualifiedId &Member,
5821  Decl *ObjCImpDecl);
5822 
5823  MemberExpr *
5824  BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc,
5825  const CXXScopeSpec *SS, SourceLocation TemplateKWLoc,
5826  ValueDecl *Member, DeclAccessPair FoundDecl,
5827  bool HadMultipleCandidates,
5828  const DeclarationNameInfo &MemberNameInfo, QualType Ty,
5830  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5831  MemberExpr *
5832  BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc,
5833  NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc,
5834  ValueDecl *Member, DeclAccessPair FoundDecl,
5835  bool HadMultipleCandidates,
5836  const DeclarationNameInfo &MemberNameInfo, QualType Ty,
5838  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5839 
5840  void ActOnDefaultCtorInitializers(Decl *CDtorDecl);
5841  bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn,
5842  FunctionDecl *FDecl,
5843  const FunctionProtoType *Proto,
5844  ArrayRef<Expr *> Args,
5845  SourceLocation RParenLoc,
5846  bool ExecConfig = false);
5848  ParmVarDecl *Param,
5849  const Expr *ArgExpr);
5850 
5851  /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
5852  /// This provides the location of the left/right parens and a list of comma
5853  /// locations.
5854  ExprResult ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc,
5855  MultiExprArg ArgExprs, SourceLocation RParenLoc,
5856  Expr *ExecConfig = nullptr);
5857  ExprResult BuildCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc,
5858  MultiExprArg ArgExprs, SourceLocation RParenLoc,
5859  Expr *ExecConfig = nullptr,
5860  bool IsExecConfig = false,
5861  bool AllowRecovery = false);
5863  MultiExprArg CallArgs);
5864  enum class AtomicArgumentOrder { API, AST };
5865  ExprResult
5866  BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange,
5867  SourceLocation RParenLoc, MultiExprArg Args,
5870  ExprResult
5871  BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc,
5872  ArrayRef<Expr *> Arg, SourceLocation RParenLoc,
5873  Expr *Config = nullptr, bool IsExecConfig = false,
5874  ADLCallKind UsesADL = ADLCallKind::NotADL);
5875 
5877  MultiExprArg ExecConfig,
5878  SourceLocation GGGLoc);
5879 
5881  Declarator &D, ParsedType &Ty,
5882  SourceLocation RParenLoc, Expr *CastExpr);
5884  TypeSourceInfo *Ty,
5885  SourceLocation RParenLoc,
5886  Expr *Op);
5888 
5889  /// Build an altivec or OpenCL literal.
5891  SourceLocation RParenLoc, Expr *E,
5892  TypeSourceInfo *TInfo);
5893 
5895 
5897  ParsedType Ty,
5898  SourceLocation RParenLoc,
5899  Expr *InitExpr);
5900 
5902  TypeSourceInfo *TInfo,
5903  SourceLocation RParenLoc,
5904  Expr *LiteralExpr);
5905 
5907  MultiExprArg InitArgList,
5908  SourceLocation RBraceLoc);
5909 
5911  MultiExprArg InitArgList,
5912  SourceLocation RBraceLoc);
5913 
5915  SourceLocation EqualOrColonLoc,
5916  bool GNUSyntax,
5917  ExprResult Init);
5918 
5919 private:
5920  static BinaryOperatorKind ConvertTokenKindToBinaryOpcode(tok::TokenKind Kind);
5921 
5922 public:
5924  tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr);
5926  BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr);
5928  Expr *LHSExpr, Expr *RHSExpr);
5929  void LookupBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc,
5930  UnresolvedSetImpl &Functions);
5931 
5932  void DiagnoseCommaOperator(const Expr *LHS, SourceLocation Loc);
5933 
5934  /// ActOnConditionalOp - Parse a ?: operation. Note that 'LHS' may be null
5935  /// in the case of a the GNU conditional expr extension.
5937  SourceLocation ColonLoc,
5938  Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr);
5939 
5940  /// ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
5942  LabelDecl *TheDecl);
5943 
5944  void ActOnStartStmtExpr();
5945  ExprResult ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt,
5946  SourceLocation RPLoc);
5947  ExprResult BuildStmtExpr(SourceLocation LPLoc, Stmt *SubStmt,
5948  SourceLocation RPLoc, unsigned TemplateDepth);
5949  // Handle the final expression in a statement expression.
5951  void ActOnStmtExprError();
5952 
5953  // __builtin_offsetof(type, identifier(.identifier|[expr])*)
5956  bool isBrackets; // true if [expr], false if .ident
5957  union {
5960  } U;
5961  };
5962 
5963  /// __builtin_offsetof(type, a.b[123][456].c)
5965  TypeSourceInfo *TInfo,
5966  ArrayRef<OffsetOfComponent> Components,
5967  SourceLocation RParenLoc);
5969  SourceLocation BuiltinLoc,
5971  ParsedType ParsedArgTy,
5972  ArrayRef<OffsetOfComponent> Components,
5973  SourceLocation RParenLoc);
5974 
5975  // __builtin_choose_expr(constExpr, expr1, expr2)
5977  Expr *CondExpr, Expr *LHSExpr,
5978  Expr *RHSExpr, SourceLocation RPLoc);
5979 
5980  // __builtin_va_arg(expr, type)
5981  ExprResult ActOnVAArg(SourceLocation BuiltinLoc, Expr *E, ParsedType Ty,
5982  SourceLocation RPLoc);
5984  TypeSourceInfo *TInfo, SourceLocation RPLoc);
5985 
5986  // __builtin_LINE(), __builtin_FUNCTION(), __builtin_FILE(),
5987  // __builtin_COLUMN(), __builtin_source_location()
5989  SourceLocation BuiltinLoc,
5990  SourceLocation RPLoc);
5991 
5992  // Build a potentially resolved SourceLocExpr.
5994  QualType ResultTy, SourceLocation BuiltinLoc,
5995  SourceLocation RPLoc,
5996  DeclContext *ParentContext);
5997 
5998  // __null
6000 
6001  bool CheckCaseExpression(Expr *E);
6002 
6003  /// Describes the result of an "if-exists" condition check.
6005  /// The symbol exists.
6007 
6008  /// The symbol does not exist.
6010 
6011  /// The name is a dependent name, so the results will differ
6012  /// from one instantiation to the next.
6014 
6015  /// An error occurred.
6017  };
6018 
6021  const DeclarationNameInfo &TargetNameInfo);
6022 
6025  bool IsIfExists, CXXScopeSpec &SS,
6026  UnqualifiedId &Name);
6027 
6029  bool IsIfExists,
6030  NestedNameSpecifierLoc QualifierLoc,
6031  DeclarationNameInfo NameInfo,
6032  Stmt *Nested);
6034  bool IsIfExists,
6035  CXXScopeSpec &SS, UnqualifiedId &Name,
6036  Stmt *Nested);
6037 
6038  //===------------------------- "Block" Extension ------------------------===//
6039 
6040  /// ActOnBlockStart - This callback is invoked when a block literal is
6041  /// started.
6042  void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope);
6043 
6044  /// ActOnBlockArguments - This callback allows processing of block arguments.
6045  /// If there are no arguments, this is still invoked.
6046  void ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo,
6047  Scope *CurScope);
6048 
6049  /// ActOnBlockError - If there is an error parsing a block, this callback
6050  /// is invoked to pop the information about the block from the action impl.
6051  void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope);
6052 
6053  /// ActOnBlockStmtExpr - This is called when the body of a block statement
6054  /// literal was successfully completed. ^(int x){...}
6056  Scope *CurScope);
6057 
6058  //===---------------------------- Clang Extensions ----------------------===//
6059 
6060  /// __builtin_convertvector(...)
6062  SourceLocation BuiltinLoc,
6063  SourceLocation RParenLoc);
6064 
6065  //===---------------------------- OpenCL Features -----------------------===//
6066 
6067  /// __builtin_astype(...)
6068  ExprResult ActOnAsTypeExpr(Expr *E, ParsedType ParsedDestTy,
6069  SourceLocation BuiltinLoc,
6070  SourceLocation RParenLoc);
6072  SourceLocation BuiltinLoc,
6073  SourceLocation RParenLoc);
6074 
6075  //===---------------------------- HLSL Features -------------------------===//
6076  Decl *ActOnStartHLSLBuffer(Scope *BufferScope, bool CBuffer,
6077  SourceLocation KwLoc, IdentifierInfo *Ident,
6078  SourceLocation IdentLoc, SourceLocation LBrace);
6079  void ActOnFinishHLSLBuffer(Decl *Dcl, SourceLocation RBrace);
6080 
6081  //===---------------------------- C++ Features --------------------------===//
6082 
6083  // Act on C++ namespaces
6085  SourceLocation NamespaceLoc,
6086  SourceLocation IdentLoc, IdentifierInfo *Ident,
6087  SourceLocation LBrace,
6088  const ParsedAttributesView &AttrList,
6089  UsingDirectiveDecl *&UsingDecl, bool IsNested);
6090  void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace);
6091 
6092  NamespaceDecl *getStdNamespace() const;
6094 
6097 
6098  CXXRecordDecl *getStdBadAlloc() const;
6099  EnumDecl *getStdAlignValT() const;
6100 
6101 private:
6102  // A cache representing if we've fully checked the various comparison category
6103  // types stored in ASTContext. The bit-index corresponds to the integer value
6104  // of a ComparisonCategoryType enumerator.
6105  llvm::SmallBitVector FullyCheckedComparisonCategories;
6106 
6107  ValueDecl *tryLookupCtorInitMemberDecl(CXXRecordDecl *ClassDecl,
6108  CXXScopeSpec &SS,
6109  ParsedType TemplateTypeTy,
6110  IdentifierInfo *MemberOrBase);
6111 
6112 public:
6114  /// The '<=>' operator was used in an expression and a builtin operator
6115  /// was selected.
6117  /// A defaulted 'operator<=>' needed the comparison category. This
6118  /// typically only applies to 'std::strong_ordering', due to the implicit
6119  /// fallback return value.
6121  };
6122 
6123  /// Lookup the specified comparison category types in the standard
6124  /// library, an check the VarDecls possibly returned by the operator<=>
6125  /// builtins for that type.
6126  ///
6127  /// \return The type of the comparison category type corresponding to the
6128  /// specified Kind, or a null type if an error occurs
6130  SourceLocation Loc,
6131  ComparisonCategoryUsage Usage);
6132 
6133  /// Tests whether Ty is an instance of std::initializer_list and, if
6134  /// it is and Element is not NULL, assigns the element type to Element.
6135  bool isStdInitializerList(QualType Ty, QualType *Element);
6136 
6137  /// Looks for the std::initializer_list template and instantiates it
6138  /// with Element, or emits an error if it's not found.
6139  ///
6140  /// \returns The instantiated template, or null on error.
6142 
6143  /// Determine whether Ctor is an initializer-list constructor, as
6144  /// defined in [dcl.init.list]p2.
6145  bool isInitListConstructor(const FunctionDecl *Ctor);
6146 
6147  Decl *ActOnUsingDirective(Scope *CurScope, SourceLocation UsingLoc,
6148  SourceLocation NamespcLoc, CXXScopeSpec &SS,
6149  SourceLocation IdentLoc,
6150  IdentifierInfo *NamespcName,
6151  const ParsedAttributesView &AttrList);
6152 
6154 
6155  Decl *ActOnNamespaceAliasDef(Scope *CurScope,
6156  SourceLocation NamespaceLoc,
6157  SourceLocation AliasLoc,
6158  IdentifierInfo *Alias,
6159  CXXScopeSpec &SS,
6160  SourceLocation IdentLoc,
6161  IdentifierInfo *Ident);
6162 
6163  void FilterUsingLookup(Scope *S, LookupResult &lookup);
6164  void HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow);
6165  bool CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Target,
6166  const LookupResult &PreviousDecls,
6167  UsingShadowDecl *&PrevShadow);
6169  NamedDecl *Target,
6170  UsingShadowDecl *PrevDecl);
6171 
6173  bool HasTypenameKeyword,
6174  const CXXScopeSpec &SS,
6175  SourceLocation NameLoc,
6176  const LookupResult &Previous);
6177  bool CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename,
6178  const CXXScopeSpec &SS,
6179  const DeclarationNameInfo &NameInfo,
6180  SourceLocation NameLoc,
6181  const LookupResult *R = nullptr,
6182  const UsingDecl *UD = nullptr);
6183 
6185  Scope *S, AccessSpecifier AS, SourceLocation UsingLoc,
6186  bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS,
6187  DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc,
6188  const ParsedAttributesView &AttrList, bool IsInstantiation,
6189  bool IsUsingIfExists);
6191  SourceLocation UsingLoc,
6192  SourceLocation EnumLoc,
6193  SourceLocation NameLoc,
6195  NamedDecl *BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
6196  ArrayRef<NamedDecl *> Expansions);
6197 
6199 
6200  /// Given a derived-class using shadow declaration for a constructor and the
6201  /// correspnding base class constructor, find or create the implicit
6202  /// synthesized derived class constructor to use for this initialization.
6205  ConstructorUsingShadowDecl *DerivedShadow);
6206 
6208  SourceLocation UsingLoc,
6209  SourceLocation TypenameLoc, CXXScopeSpec &SS,
6210  UnqualifiedId &Name, SourceLocation EllipsisLoc,
6211  const ParsedAttributesView &AttrList);
6213  SourceLocation UsingLoc,
6214  SourceLocation EnumLoc,
6215  SourceLocation IdentLoc, IdentifierInfo &II,
6216  CXXScopeSpec *SS = nullptr);
6218  MultiTemplateParamsArg TemplateParams,
6219  SourceLocation UsingLoc, UnqualifiedId &Name,
6220  const ParsedAttributesView &AttrList,
6221  TypeResult Type, Decl *DeclFromDeclSpec);
6222 
6223  /// BuildCXXConstructExpr - Creates a complete call to a constructor,
6224  /// including handling of its default argument expressions.
6225  ///
6226  /// \param ConstructKind - a CXXConstructExpr::ConstructionKind
6227  ExprResult
6228  BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
6229  NamedDecl *FoundDecl,
6230  CXXConstructorDecl *Constructor, MultiExprArg Exprs,
6231  bool HadMultipleCandidates, bool IsListInitialization,
6232  bool IsStdInitListInitialization,
6233  bool RequiresZeroInit, unsigned ConstructKind,
6234  SourceRange ParenRange);
6235 
6236  /// Build a CXXConstructExpr whose constructor has already been resolved if
6237  /// it denotes an inherited constructor.
6238  ExprResult
6239  BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
6240  CXXConstructorDecl *Constructor, bool Elidable,
6241  MultiExprArg Exprs,
6242  bool HadMultipleCandidates, bool IsListInitialization,
6243  bool IsStdInitListInitialization,
6244  bool RequiresZeroInit, unsigned ConstructKind,
6245  SourceRange ParenRange);
6246 
6247  // FIXME: Can we remove this and have the above BuildCXXConstructExpr check if
6248  // the constructor can be elidable?
6249  ExprResult
6250  BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
6251  NamedDecl *FoundDecl,
6252  CXXConstructorDecl *Constructor, bool Elidable,
6253  MultiExprArg Exprs, bool HadMultipleCandidates,
6254  bool IsListInitialization,
6255  bool IsStdInitListInitialization, bool RequiresZeroInit,
6256  unsigned ConstructKind, SourceRange ParenRange);
6257 
6259  SourceLocation InitLoc);
6260 
6262 
6263 
6264  /// Instantiate or parse a C++ default argument expression as necessary.
6265  /// Return true on error.
6267  ParmVarDecl *Param, Expr *Init = nullptr,
6268  bool SkipImmediateInvocations = true);
6269 
6270  /// BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating
6271  /// the default expr if needed.
6273  ParmVarDecl *Param, Expr *Init = nullptr);
6274 
6275  /// FinalizeVarWithDestructor - Prepare for calling destructor on the
6276  /// constructed variable.
6277  void FinalizeVarWithDestructor(VarDecl *VD, const RecordType *DeclInitType);
6278 
6279  /// Helper class that collects exception specifications for
6280  /// implicitly-declared special member functions.
6282  // Pointer to allow copying
6283  Sema *Self;
6284  // We order exception specifications thus:
6285  // noexcept is the most restrictive, but is only used in C++11.
6286  // throw() comes next.
6287  // Then a throw(collected exceptions)
6288  // Finally no specification, which is expressed as noexcept(false).
6289  // throw(...) is used instead if any called function uses it.
6290  ExceptionSpecificationType ComputedEST;
6291  llvm::SmallPtrSet<CanQualType, 4> ExceptionsSeen;
6292  SmallVector<QualType, 4> Exceptions;
6293 
6294  void ClearExceptions() {
6295  ExceptionsSeen.clear();
6296  Exceptions.clear();
6297  }
6298 
6299  public:
6301  : Self(&Self), ComputedEST(EST_BasicNoexcept) {
6302  if (!Self.getLangOpts().CPlusPlus11)
6303  ComputedEST = EST_DynamicNone;
6304  }
6305 
6306  /// Get the computed exception specification type.
6308  assert(!isComputedNoexcept(ComputedEST) &&
6309  "noexcept(expr) should not be a possible result");
6310  return ComputedEST;
6311  }
6312 
6313  /// The number of exceptions in the exception specification.
6314  unsigned size() const { return Exceptions.size(); }
6315 
6316  /// The set of exceptions in the exception specification.
6317  const QualType *data() const { return Exceptions.data(); }
6318 
6319  /// Integrate another called method into the collected data.
6320  void CalledDecl(SourceLocation CallLoc, const CXXMethodDecl *Method);
6321 
6322  /// Integrate an invoked expression into the collected data.
6323  void CalledExpr(Expr *E) { CalledStmt(E); }
6324 
6325  /// Integrate an invoked statement into the collected data.
6326  void CalledStmt(Stmt *S);
6327 
6328  /// Overwrite an EPI's exception specification with this
6329  /// computed exception specification.
6332  ESI.Type = getExceptionSpecType();
6333  if (ESI.Type == EST_Dynamic) {
6334  ESI.Exceptions = Exceptions;
6335  } else if (ESI.Type == EST_None) {
6336  /// C++11 [except.spec]p14:
6337  /// The exception-specification is noexcept(false) if the set of
6338  /// potential exceptions of the special member function contains "any"
6339  ESI.Type = EST_NoexceptFalse;
6341  tok::kw_false).get();
6342  }
6343  return ESI;
6344  }
6345  };
6346 
6347  /// Evaluate the implicit exception specification for a defaulted
6348  /// special member function.
6350 
6351  /// Check the given noexcept-specifier, convert its expression, and compute
6352  /// the appropriate ExceptionSpecificationType.
6353  ExprResult ActOnNoexceptSpec(Expr *NoexceptExpr,
6355 
6356  /// Check the given exception-specification and update the
6357  /// exception specification information with the results.
6358  void checkExceptionSpecification(bool IsTopLevel,
6360  ArrayRef<ParsedType> DynamicExceptions,
6361  ArrayRef<SourceRange> DynamicExceptionRanges,
6362  Expr *NoexceptExpr,
6363  SmallVectorImpl<QualType> &Exceptions,
6365 
6366  /// Determine if we're in a case where we need to (incorrectly) eagerly
6367  /// parse an exception specification to work around a libstdc++ bug.
6369 
6370  /// Add an exception-specification to the given member function
6371  /// (or member function template). The exception-specification was parsed
6372  /// after the method itself was declared.
6375  SourceRange SpecificationRange,
6376  ArrayRef<ParsedType> DynamicExceptions,
6377  ArrayRef<SourceRange> DynamicExceptionRanges,
6378  Expr *NoexceptExpr);
6379 
6380  class InheritedConstructorInfo;
6381 
6382  /// Determine if a special member function should have a deleted
6383  /// definition when it is defaulted.
6385  InheritedConstructorInfo *ICI = nullptr,
6386  bool Diagnose = false);
6387 
6388  /// Produce notes explaining why a defaulted function was defined as deleted.
6390 
6391  /// Declare the implicit default constructor for the given class.
6392  ///
6393  /// \param ClassDecl The class declaration into which the implicit
6394  /// default constructor will be added.
6395  ///
6396  /// \returns The implicitly-declared default constructor.
6398  CXXRecordDecl *ClassDecl);
6399 
6400  /// DefineImplicitDefaultConstructor - Checks for feasibility of
6401  /// defining this constructor as the default constructor.
6402  void DefineImplicitDefaultConstructor(SourceLocation CurrentLocation,
6403  CXXConstructorDecl *Constructor);
6404 
6405  /// Declare the implicit destructor for the given class.
6406  ///
6407  /// \param ClassDecl The class declaration into which the implicit
6408  /// destructor will be added.
6409  ///
6410  /// \returns The implicitly-declared destructor.
6412 
6413  /// DefineImplicitDestructor - Checks for feasibility of
6414  /// defining this destructor as the default destructor.
6415  void DefineImplicitDestructor(SourceLocation CurrentLocation,
6416  CXXDestructorDecl *Destructor);
6417 
6418  /// Build an exception spec for destructors that don't have one.
6419  ///
6420  /// C++11 says that user-defined destructors with no exception spec get one
6421  /// that looks as if the destructor was implicitly declared.
6423 
6424  /// Define the specified inheriting constructor.
6426  CXXConstructorDecl *Constructor);
6427 
6428  /// Declare the implicit copy constructor for the given class.
6429  ///
6430  /// \param ClassDecl The class declaration into which the implicit
6431  /// copy constructor will be added.
6432  ///
6433  /// \returns The implicitly-declared copy constructor.
6435 
6436  /// DefineImplicitCopyConstructor - Checks for feasibility of
6437  /// defining this constructor as the copy constructor.
6438  void DefineImplicitCopyConstructor(SourceLocation CurrentLocation,
6439  CXXConstructorDecl *Constructor);
6440 
6441  /// Declare the implicit move constructor for the given class.
6442  ///
6443  /// \param ClassDecl The Class declaration into which the implicit
6444  /// move constructor will be added.
6445  ///
6446  /// \returns The implicitly-declared move constructor, or NULL if it wasn't
6447  /// declared.
6449 
6450  /// DefineImplicitMoveConstructor - Checks for feasibility of
6451  /// defining this constructor as the move constructor.
6452  void DefineImplicitMoveConstructor(SourceLocation CurrentLocation,
6453  CXXConstructorDecl *Constructor);
6454 
6455  /// Declare the implicit copy assignment operator for the given class.
6456  ///
6457  /// \param ClassDecl The class declaration into which the implicit
6458  /// copy assignment operator will be added.
6459  ///
6460  /// \returns The implicitly-declared copy assignment operator.
6462 
6463  /// Defines an implicitly-declared copy assignment operator.
6464  void DefineImplicitCopyAssignment(SourceLocation CurrentLocation,
6465  CXXMethodDecl *MethodDecl);
6466 
6467  /// Declare the implicit move assignment operator for the given class.
6468  ///
6469  /// \param ClassDecl The Class declaration into which the implicit
6470  /// move assignment operator will be added.
6471  ///
6472  /// \returns The implicitly-declared move assignment operator, or NULL if it
6473  /// wasn't declared.
6475 
6476  /// Defines an implicitly-declared move assignment operator.
6477  void DefineImplicitMoveAssignment(SourceLocation CurrentLocation,
6478  CXXMethodDecl *MethodDecl);
6479 
6480  /// Force the declaration of any implicitly-declared members of this
6481  /// class.
6483 
6484  /// Check a completed declaration of an implicit special member.
6486 
6487  /// Determine whether the given function is an implicitly-deleted
6488  /// special member function.
6490 
6491  /// Check whether 'this' shows up in the type of a static member
6492  /// function after the (naturally empty) cv-qualifier-seq would be.
6493  ///
6494  /// \returns true if an error occurred.
6496 
6497  /// Whether this' shows up in the exception specification of a static
6498  /// member function.
6500 
6501  /// Check whether 'this' shows up in the attributes of the given
6502  /// static member function.
6503  ///
6504  /// \returns true if an error occurred.
6506 
6507  /// MaybeBindToTemporary - If the passed in expression has a record type with
6508  /// a non-trivial destructor, this will return CXXBindTemporaryExpr. Otherwise
6509  /// it simply returns the passed in expression.
6511 
6512  /// Wrap the expression in a ConstantExpr if it is a potential immediate
6513  /// invocation.
6515 
6516  bool CompleteConstructorCall(CXXConstructorDecl *Constructor,
6517  QualType DeclInitType, MultiExprArg ArgsPtr,
6518  SourceLocation Loc,
6519  SmallVectorImpl<Expr *> &ConvertedArgs,
6520  bool AllowExplicit = false,
6521  bool IsListInitialization = false);
6522 
6524  SourceLocation NameLoc,
6525  IdentifierInfo &Name);
6526 
6528  Scope *S, CXXScopeSpec &SS,
6529  bool EnteringContext);
6531  IdentifierInfo &II, SourceLocation NameLoc,
6532  Scope *S, CXXScopeSpec &SS,
6533  ParsedType ObjectType,
6534  bool EnteringContext);
6535 
6537  ParsedType ObjectType);
6538 
6539  // Checks that reinterpret casts don't have undefined behavior.
6540  void CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType,
6541  bool IsDereference, SourceRange Range);
6542 
6543  // Checks that the vector type should be initialized from a scalar
6544  // by splatting the value rather than populating a single element.
6545  // This is the case for AltiVecVector types as well as with
6546  // AltiVecPixel and AltiVecBool when -faltivec-src-compat=xl is specified.
6547  bool ShouldSplatAltivecScalarInCast(const VectorType *VecTy);
6548 
6549  // Checks if the -faltivec-src-compat=gcc option is specified.
6550  // If so, AltiVecVector, AltiVecBool and AltiVecPixel types are
6551  // treated the same way as they are when trying to initialize
6552  // these vectors on gcc (an error is emitted).
6554  QualType SrcTy);
6555 
6556  /// ActOnCXXNamedCast - Parse
6557  /// {dynamic,static,reinterpret,const,addrspace}_cast's.
6560  SourceLocation LAngleBracketLoc,
6561  Declarator &D,
6562  SourceLocation RAngleBracketLoc,
6563  SourceLocation LParenLoc,
6564  Expr *E,
6565  SourceLocation RParenLoc);
6566 
6569  TypeSourceInfo *Ty,
6570  Expr *E,
6571  SourceRange AngleBrackets,
6572  SourceRange Parens);
6573 
6575  ExprResult Operand,
6576  SourceLocation RParenLoc);
6577 
6579  Expr *Operand, SourceLocation RParenLoc);
6580 
6581  ExprResult BuildCXXTypeId(QualType TypeInfoType,
6582  SourceLocation TypeidLoc,
6583  TypeSourceInfo *Operand,
6584  SourceLocation RParenLoc);
6585  ExprResult BuildCXXTypeId(QualType TypeInfoType,
6586  SourceLocation TypeidLoc,
6587  Expr *Operand,
6588  SourceLocation RParenLoc);
6589 
6590  /// ActOnCXXTypeid - Parse typeid( something ).
6592  SourceLocation LParenLoc, bool isType,
6593  void *TyOrExpr,
6594  SourceLocation RParenLoc);
6595 
6596  ExprResult BuildCXXUuidof(QualType TypeInfoType,
6597  SourceLocation TypeidLoc,
6598  TypeSourceInfo *Operand,
6599  SourceLocation RParenLoc);
6600  ExprResult BuildCXXUuidof(QualType TypeInfoType,
6601  SourceLocation TypeidLoc,
6602  Expr *Operand,
6603  SourceLocation RParenLoc);
6604 
6605  /// ActOnCXXUuidof - Parse __uuidof( something ).
6607  SourceLocation LParenLoc, bool isType,
6608  void *TyOrExpr,
6609  SourceLocation RParenLoc);
6610 
6611  /// Handle a C++1z fold-expression: ( expr op ... op expr ).
6612  ExprResult ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS,
6613  tok::TokenKind Operator,
6614  SourceLocation EllipsisLoc, Expr *RHS,
6615  SourceLocation RParenLoc);
6617  SourceLocation LParenLoc, Expr *LHS,
6618  BinaryOperatorKind Operator,
6619  SourceLocation EllipsisLoc, Expr *RHS,
6620  SourceLocation RParenLoc,
6621  std::optional<unsigned> NumExpansions);
6623  BinaryOperatorKind Operator);
6624 
6625  //// ActOnCXXThis - Parse 'this' pointer.
6627 
6628  /// Build a CXXThisExpr and mark it referenced in the current context.
6629  Expr *BuildCXXThisExpr(SourceLocation Loc, QualType Type, bool IsImplicit);
6631 
6632  /// Try to retrieve the type of the 'this' pointer.
6633  ///
6634  /// \returns The type of 'this', if possible. Otherwise, returns a NULL type.
6636 
6637  /// When non-NULL, the C++ 'this' expression is allowed despite the
6638  /// current context not being a non-static member function. In such cases,
6639  /// this provides the type used for 'this'.
6641 
6642  /// RAII object used to temporarily allow the C++ 'this' expression
6643  /// to be used, with the given qualifiers on the current class type.
6645  Sema &S;
6646  QualType OldCXXThisTypeOverride;
6647  bool Enabled;
6648 
6649  public:
6650  /// Introduce a new scope where 'this' may be allowed (when enabled),
6651  /// using the given declaration (which is either a class template or a
6652  /// class) along with the given qualifiers.
6653  /// along with the qualifiers placed on '*this'.
6654  CXXThisScopeRAII(Sema &S, Decl *ContextDecl, Qualifiers CXXThisTypeQuals,
6655  bool Enabled = true);
6656 
6658  };
6659 
6660  /// Make sure the value of 'this' is actually available in the current
6661  /// context, if it is a potentially evaluated context.
6662  ///
6663  /// \param Loc The location at which the capture of 'this' occurs.
6664  ///
6665  /// \param Explicit Whether 'this' is explicitly captured in a lambda
6666  /// capture list.
6667  ///
6668  /// \param FunctionScopeIndexToStopAt If non-null, it points to the index
6669  /// of the FunctionScopeInfo stack beyond which we do not attempt to capture.
6670  /// This is useful when enclosing lambdas must speculatively capture
6671  /// 'this' that may or may not be used in certain specializations of
6672  /// a nested generic lambda (depending on whether the name resolves to
6673  /// a non-static member function or a static function).
6674  /// \return returns 'true' if failed, 'false' if success.
6675  bool CheckCXXThisCapture(SourceLocation Loc, bool Explicit = false,
6676  bool BuildAndDiagnose = true,
6677  const unsigned *const FunctionScopeIndexToStopAt = nullptr,
6678  bool ByCopy = false);
6679 
6680  /// Determine whether the given type is the type of *this that is used
6681  /// outside of the body of a member function for a type that is currently
6682  /// being defined.
6684 
6685  /// ActOnCXXBoolLiteral - Parse {true,false} literals.
6687 
6688 
6689  /// ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
6691 
6692  ExprResult
6694  SourceLocation AtLoc, SourceLocation RParen);
6695 
6696  /// ActOnCXXNullPtrLiteral - Parse 'nullptr'.
6698 
6699  //// ActOnCXXThrow - Parse throw expressions.
6702  bool IsThrownVarInScope);
6703  bool CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ThrowTy, Expr *E);
6704 
6705  /// ActOnCXXTypeConstructExpr - Parse construction of a specified type.
6706  /// Can be interpreted either as function-style casting ("int(x)")
6707  /// or class type construction ("ClassType(x,y,z)")
6708  /// or creation of a value-initialized type ("int()").
6710  SourceLocation LParenOrBraceLoc,
6711  MultiExprArg Exprs,
6712  SourceLocation RParenOrBraceLoc,
6713  bool ListInitialization);
6714 
6716  SourceLocation LParenLoc,
6717  MultiExprArg Exprs,
6718  SourceLocation RParenLoc,
6719  bool ListInitialization);
6720 
6721  /// ActOnCXXNew - Parsed a C++ 'new' expression.
6722  ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
6723  SourceLocation PlacementLParen,
6724  MultiExprArg PlacementArgs,
6725  SourceLocation PlacementRParen,
6726  SourceRange TypeIdParens, Declarator &D,
6727  Expr *Initializer);
6728  ExprResult
6729  BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen,
6730  MultiExprArg PlacementArgs, SourceLocation PlacementRParen,
6731  SourceRange TypeIdParens, QualType AllocType,
6732  TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize,
6733  SourceRange DirectInitRange, Expr *Initializer);
6734 
6735  /// Determine whether \p FD is an aligned allocation or deallocation
6736  /// function that is unavailable.
6738 
6739  /// Produce diagnostics if \p FD is an aligned allocation or deallocation
6740  /// function that is unavailable.
6742  SourceLocation Loc);
6743 
6744  bool CheckAllocatedType(QualType AllocType, SourceLocation Loc,
6745  SourceRange R);
6746 
6747  /// The scope in which to find allocation functions.
6749  /// Only look for allocation functions in the global scope.
6751  /// Only look for allocation functions in the scope of the
6752  /// allocated class.
6754  /// Look for allocation functions in both the global scope
6755  /// and in the scope of the allocated class.
6757  };
6758 
6759  /// Finds the overloads of operator new and delete that are appropriate
6760  /// for the allocation.
6761  bool FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range,
6762  AllocationFunctionScope NewScope,
6763  AllocationFunctionScope DeleteScope,
6764  QualType AllocType, bool IsArray,
6765  bool &PassAlignment, MultiExprArg PlaceArgs,
6766  FunctionDecl *&OperatorNew,
6767  FunctionDecl *&OperatorDelete,
6768  bool Diagnose = true);
6769  void DeclareGlobalNewDelete();
6771  ArrayRef<QualType> Params);
6772 
6774  DeclarationName Name, FunctionDecl *&Operator,
6775  bool Diagnose = true, bool WantSize = false,
6776  bool WantAligned = false);
6778  bool CanProvideSize,
6779  bool Overaligned,
6780  DeclarationName Name);
6782  CXXRecordDecl *RD);
6783 
6784  /// ActOnCXXDelete - Parsed a C++ 'delete' expression
6786  bool UseGlobal, bool ArrayForm,
6787  Expr *Operand);
6789  bool IsDelete, bool CallCanBeVirtual,
6790  bool WarnOnNonAbstractTypes,
6791  SourceLocation DtorLoc);
6792 
6794  Expr *Operand, SourceLocation RParen);
6796  SourceLocation RParen);
6797 
6798  /// Parsed one of the type trait support pseudo-functions.
6800  ArrayRef<ParsedType> Args,
6801  SourceLocation RParenLoc);
6804  SourceLocation RParenLoc);
6805 
6806  /// ActOnArrayTypeTrait - Parsed one of the binary type trait support
6807  /// pseudo-functions.
6809  SourceLocation KWLoc,
6810  ParsedType LhsTy,
6811  Expr *DimExpr,
6812  SourceLocation RParen);
6813 
6815  SourceLocation KWLoc,
6816  TypeSourceInfo *TSInfo,
6817  Expr *DimExpr,
6818  SourceLocation RParen);
6819 
6820  /// ActOnExpressionTrait - Parsed one of the unary type trait support
6821  /// pseudo-functions.
6823  SourceLocation KWLoc,
6824  Expr *Queried,
6825  SourceLocation RParen);
6826 
6828  SourceLocation KWLoc,
6829  Expr *Queried,
6830  SourceLocation RParen);
6831 
6833  Expr *Base,
6834  SourceLocation OpLoc,
6835  tok::TokenKind OpKind,
6836  ParsedType &ObjectType,
6837  bool &MayBePseudoDestructor);
6838 
6840  SourceLocation OpLoc,
6841  tok::TokenKind OpKind,
6842  const CXXScopeSpec &SS,
6844  SourceLocation CCLoc,
6845  SourceLocation TildeLoc,
6846  PseudoDestructorTypeStorage DestroyedType);
6847 
6849  SourceLocation OpLoc,
6850  tok::TokenKind OpKind,
6851  CXXScopeSpec &SS,
6852  UnqualifiedId &FirstTypeName,
6853  SourceLocation CCLoc,
6854  SourceLocation TildeLoc,
6855  UnqualifiedId &SecondTypeName);
6856 
6858  SourceLocation OpLoc,
6859  tok::TokenKind OpKind,
6860  SourceLocation TildeLoc,
6861  const DeclSpec& DS);
6862 
6863  /// MaybeCreateExprWithCleanups - If the current full-expression
6864  /// requires any cleanups, surround it with a ExprWithCleanups node.
6865  /// Otherwise, just returns the passed-in expression.
6869 
6872  bool BoundToLvalueReference);
6873 
6874  ExprResult ActOnFinishFullExpr(Expr *Expr, bool DiscardedValue) {
6875  return ActOnFinishFullExpr(
6876  Expr, Expr ? Expr->getExprLoc() : SourceLocation(), DiscardedValue);
6877  }
6879  bool DiscardedValue, bool IsConstexpr = false,
6880  bool IsTemplateArgument = false);
6882 
6883  // Marks SS invalid if it represents an incomplete type.
6885  // Complete an enum decl, maybe without a scope spec.
6887  CXXScopeSpec *SS = nullptr);
6888 
6891  bool EnteringContext = false);
6892  bool isDependentScopeSpecifier(const CXXScopeSpec &SS);
6894 
6895  /// The parser has parsed a global nested-name-specifier '::'.
6896  ///
6897  /// \param CCLoc The location of the '::'.
6898  ///
6899  /// \param SS The nested-name-specifier, which will be updated in-place
6900  /// to reflect the parsed nested-name-specifier.
6901  ///
6902  /// \returns true if an error occurred, false otherwise.
6904 
6905  /// The parser has parsed a '__super' nested-name-specifier.
6906  ///
6907  /// \param SuperLoc The location of the '__super' keyword.
6908  ///
6909  /// \param ColonColonLoc The location of the '::'.
6910  ///
6911  /// \param SS The nested-name-specifier, which will be updated in-place
6912  /// to reflect the parsed nested-name-specifier.
6913  ///
6914  /// \returns true if an error occurred, false otherwise.
6916  SourceLocation ColonColonLoc, CXXScopeSpec &SS);
6917 
6919  bool *CanCorrect = nullptr);
6921 
6922  /// Keeps information about an identifier in a nested-name-spec.
6923  ///
6925  /// The type of the object, if we're parsing nested-name-specifier in
6926  /// a member access expression.
6928 
6929  /// The identifier preceding the '::'.
6931 
6932  /// The location of the identifier.
6934 
6935  /// The location of the '::'.
6937 
6938  /// Creates info object for the most typical case.
6940  SourceLocation ColonColonLoc, ParsedType ObjectType = ParsedType())
6942  CCLoc(ColonColonLoc) {
6943  }
6944 
6946  SourceLocation ColonColonLoc, QualType ObjectType)
6947  : ObjectType(ParsedType::make(ObjectType)), Identifier(II),
6948  IdentifierLoc(IdLoc), CCLoc(ColonColonLoc) {
6949  }
6950  };
6951 
6953  NestedNameSpecInfo &IdInfo);
6954 
6956  NestedNameSpecInfo &IdInfo,
6957  bool EnteringContext,
6958  CXXScopeSpec &SS,
6959  NamedDecl *ScopeLookupResult,
6960  bool ErrorRecoveryLookup,
6961  bool *IsCorrectedToColon = nullptr,
6962  bool OnlyNamespace = false);
6963 
6964  /// The parser has parsed a nested-name-specifier 'identifier::'.
6965  ///
6966  /// \param S The scope in which this nested-name-specifier occurs.
6967  ///
6968  /// \param IdInfo Parser information about an identifier in the
6969  /// nested-name-spec.
6970  ///
6971  /// \param EnteringContext Whether we're entering the context nominated by
6972  /// this nested-name-specifier.
6973  ///
6974  /// \param SS The nested-name-specifier, which is both an input
6975  /// parameter (the nested-name-specifier before this type) and an
6976  /// output parameter (containing the full nested-name-specifier,
6977  /// including this new type).
6978  ///
6979  /// \param IsCorrectedToColon If not null, suggestions to replace '::' -> ':'
6980  /// are allowed. The bool value pointed by this parameter is set to 'true'
6981  /// if the identifier is treated as if it was followed by ':', not '::'.
6982  ///
6983  /// \param OnlyNamespace If true, only considers namespaces in lookup.
6984  ///
6985  /// \returns true if an error occurred, false otherwise.
6987  NestedNameSpecInfo &IdInfo,
6988  bool EnteringContext,
6989  CXXScopeSpec &SS,
6990  bool *IsCorrectedToColon = nullptr,
6991  bool OnlyNamespace = false);
6992 
6994 
6996  const DeclSpec &DS,
6997  SourceLocation ColonColonLoc);
6998 
7000  NestedNameSpecInfo &IdInfo,
7001  bool EnteringContext);
7002 
7003  /// The parser has parsed a nested-name-specifier
7004  /// 'template[opt] template-name < template-args >::'.
7005  ///
7006  /// \param S The scope in which this nested-name-specifier occurs.
7007  ///
7008  /// \param SS The nested-name-specifier, which is both an input
7009  /// parameter (the nested-name-specifier before this type) and an
7010  /// output parameter (containing the full nested-name-specifier,
7011  /// including this new type).
7012  ///
7013  /// \param TemplateKWLoc the location of the 'template' keyword, if any.
7014  /// \param TemplateName the template name.
7015  /// \param TemplateNameLoc The location of the template name.
7016  /// \param LAngleLoc The location of the opening angle bracket ('<').
7017  /// \param TemplateArgs The template arguments.
7018  /// \param RAngleLoc The location of the closing angle bracket ('>').
7019  /// \param CCLoc The location of the '::'.
7020  ///
7021  /// \param EnteringContext Whether we're entering the context of the
7022  /// nested-name-specifier.
7023  ///
7024  ///
7025  /// \returns true if an error occurred, false otherwise.
7027  CXXScopeSpec &SS,
7028  SourceLocation TemplateKWLoc,
7030  SourceLocation TemplateNameLoc,
7031  SourceLocation LAngleLoc,
7032  ASTTemplateArgsPtr TemplateArgs,
7033  SourceLocation RAngleLoc,
7034  SourceLocation CCLoc,
7035  bool EnteringContext);
7036 
7037  /// Given a C++ nested-name-specifier, produce an annotation value
7038  /// that the parser can use later to reconstruct the given
7039  /// nested-name-specifier.
7040  ///
7041  /// \param SS A nested-name-specifier.
7042  ///
7043  /// \returns A pointer containing all of the information in the
7044  /// nested-name-specifier \p SS.
7046 
7047  /// Given an annotation pointer for a nested-name-specifier, restore
7048  /// the nested-name-specifier structure.
7049  ///
7050  /// \param Annotation The annotation pointer, produced by
7051  /// \c SaveNestedNameSpecifierAnnotation().
7052  ///
7053  /// \param AnnotationRange The source range corresponding to the annotation.
7054  ///
7055  /// \param SS The nested-name-specifier that will be updated with the contents
7056  /// of the annotation pointer.
7057  void RestoreNestedNameSpecifierAnnotation(void *Annotation,
7058  SourceRange AnnotationRange,
7059  CXXScopeSpec &SS);
7060 
7061  bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS);
7062 
7063  /// ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global
7064  /// scope or nested-name-specifier) is parsed, part of a declarator-id.
7065  /// After this method is called, according to [C++ 3.4.3p3], names should be
7066  /// looked up in the declarator-id's scope, until the declarator is parsed and
7067  /// ActOnCXXExitDeclaratorScope is called.
7068  /// The 'SS' should be a non-empty valid CXXScopeSpec.
7070 
7071  /// ActOnCXXExitDeclaratorScope - Called when a declarator that previously
7072  /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
7073  /// CXXScopeSpec that was passed to ActOnCXXEnterDeclaratorScope as well.
7074  /// Used to indicate that names should revert to being looked up in the
7075  /// defining scope.
7076  void ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS);
7077 
7078  /// ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an
7079  /// initializer for the declaration 'Dcl'.
7080  /// After this method is called, according to [C++ 3.4.1p13], if 'Dcl' is a
7081  /// static data member of class X, names should be looked up in the scope of
7082  /// class X.
7083  void ActOnCXXEnterDeclInitializer(Scope *S, Decl *Dcl);
7084 
7085  /// ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an
7086  /// initializer for the declaration 'Dcl'.
7087  void ActOnCXXExitDeclInitializer(Scope *S, Decl *Dcl);
7088 
7089  /// Create a new lambda closure type.
7091  TypeSourceInfo *Info,
7092  unsigned LambdaDependencyKind,
7093  LambdaCaptureDefault CaptureDefault);
7094 
7095  /// Start the definition of a lambda expression.
7096  CXXMethodDecl *
7097  startLambdaDefinition(CXXRecordDecl *Class, SourceRange IntroducerRange,
7098  TypeSourceInfo *MethodType, SourceLocation EndLoc,
7099  ArrayRef<ParmVarDecl *> Params,
7100  ConstexprSpecKind ConstexprKind, StorageClass SC,
7101  Expr *TrailingRequiresClause);
7102 
7103  /// Number lambda for linkage purposes if necessary.
7104  void handleLambdaNumbering(
7105  CXXRecordDecl *Class, CXXMethodDecl *Method,
7106  std::optional<std::tuple<bool, unsigned, unsigned, Decl *>> Mangling =
7107  std::nullopt);
7108 
7109  /// Endow the lambda scope info with the relevant properties.
7111  CXXMethodDecl *CallOperator,
7112  SourceRange IntroducerRange,
7113  LambdaCaptureDefault CaptureDefault,
7114  SourceLocation CaptureDefaultLoc,
7115  bool ExplicitParams,
7116  bool ExplicitResultType,
7117  bool Mutable);
7118 
7119  /// Perform initialization analysis of the init-capture and perform
7120  /// any implicit conversions such as an lvalue-to-rvalue conversion if
7121  /// not being used to initialize a reference.
7123  SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc,
7124  IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init) {
7126  Loc, ByRef, EllipsisLoc, std::nullopt, Id,
7127  InitKind != LambdaCaptureInitKind::CopyInit, Init));
7128  }
7130  SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc,
7131  std::optional<unsigned> NumExpansions, IdentifierInfo *Id,
7132  bool DirectInit, Expr *&Init);
7133 
7134  /// Create a dummy variable within the declcontext of the lambda's
7135  /// call operator, for name lookup purposes for a lambda init capture.
7136  ///
7137  /// CodeGen handles emission of lambda captures, ignoring these dummy
7138  /// variables appropriately.
7140  QualType InitCaptureType,
7141  SourceLocation EllipsisLoc,
7142  IdentifierInfo *Id,
7143  unsigned InitStyle, Expr *Init);
7144 
7145  /// Add an init-capture to a lambda scope.
7147  bool isReferenceType);
7148 
7149  /// Note that we have finished the explicit captures for the
7150  /// given lambda.
7152 
7153  /// \brief This is called after parsing the explicit template parameter list
7154  /// on a lambda (if it exists) in C++2a.
7156  ArrayRef<NamedDecl *> TParams,
7157  SourceLocation RAngleLoc,
7158  ExprResult RequiresClause);
7159 
7160  /// Introduce the lambda parameters into scope.
7161  void addLambdaParameters(
7163  CXXMethodDecl *CallOperator, Scope *CurScope);
7164 
7165  /// Deduce a block or lambda's return type based on the return
7166  /// statements present in the body.
7168 
7169  /// ActOnStartOfLambdaDefinition - This is called just before we start
7170  /// parsing the body of a lambda; it analyzes the explicit captures and
7171  /// arguments, and sets up various data-structures for the body of the
7172  /// lambda.
7174  Declarator &ParamInfo, Scope *CurScope);
7175 
7176  /// ActOnLambdaError - If there is an error parsing a lambda, this callback
7177  /// is invoked to pop the information about the lambda.
7178  void ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope,
7179  bool IsInstantiation = false);
7180 
7181  /// ActOnLambdaExpr - This is called when the body of a lambda expression
7182  /// was successfully completed.
7184  Scope *CurScope);
7185 
7186  /// Does copying/destroying the captured variable have side effects?
7187  bool CaptureHasSideEffects(const sema::Capture &From);
7188 
7189  /// Diagnose if an explicit lambda capture is unused. Returns true if a
7190  /// diagnostic is emitted.
7191  bool DiagnoseUnusedLambdaCapture(SourceRange CaptureRange,
7192  const sema::Capture &From);
7193 
7194  /// Build a FieldDecl suitable to hold the given capture.
7196 
7197  /// Initialize the given capture with a suitable expression.
7199  SourceLocation ImplicitCaptureLoc,
7200  bool IsOpenMPMapping = false);
7201 
7202  /// Complete a lambda-expression having processed and attached the
7203  /// lambda body.
7205  sema::LambdaScopeInfo *LSI);
7206 
7207  /// Get the return type to use for a lambda's conversion function(s) to
7208  /// function pointer type, given the type of the call operator.
7209  QualType
7211  CallingConv CC);
7212 
7213  /// Define the "body" of the conversion from a lambda object to a
7214  /// function pointer.
7215  ///
7216  /// This routine doesn't actually define a sensible body; rather, it fills
7217  /// in the initialization expression needed to copy the lambda object into
7218  /// the block, and IR generation actually generates the real body of the
7219  /// block pointer conversion.
7221  SourceLocation CurrentLoc, CXXConversionDecl *Conv);
7222 
7223  /// Define the "body" of the conversion from a lambda object to a
7224  /// block pointer.
7225  ///
7226  /// This routine doesn't actually define a sensible body; rather, it fills
7227  /// in the initialization expression needed to copy the lambda object into
7228  /// the block, and IR generation actually generates the real body of the
7229  /// block pointer conversion.
7231  CXXConversionDecl *Conv);
7232 
7234  SourceLocation ConvLocation,
7235  CXXConversionDecl *Conv,
7236  Expr *Src);
7237 
7238  /// Check whether the given expression is a valid constraint expression.
7239  /// A diagnostic is emitted if it is not, false is returned, and
7240  /// PossibleNonPrimary will be set to true if the failure might be due to a
7241  /// non-primary expression being used as an atomic constraint.
7242  bool CheckConstraintExpression(const Expr *CE, Token NextToken = Token(),
7243  bool *PossibleNonPrimary = nullptr,
7244  bool IsTrailingRequiresClause = false);
7245 
7246 private:
7247  /// Caches pairs of template-like decls whose associated constraints were
7248  /// checked for subsumption and whether or not the first's constraints did in
7249  /// fact subsume the second's.
7250  llvm::DenseMap<std::pair<NamedDecl *, NamedDecl *>, bool> SubsumptionCache;
7251  /// Caches the normalized associated constraints of declarations (concepts or
7252  /// constrained declarations). If an error occurred while normalizing the
7253  /// associated constraints of the template or concept, nullptr will be cached
7254  /// here.
7255  llvm::DenseMap<NamedDecl *, NormalizedConstraint *>
7256  NormalizationCache;
7257 
7258  llvm::ContextualFoldingSet<ConstraintSatisfaction, const ASTContext &>
7259  SatisfactionCache;
7260 
7261  /// Introduce the instantiated function parameters into the local
7262  /// instantiation scope, and set the parameter names to those used
7263  /// in the template.
7264  bool addInstantiatedParametersToScope(
7265  FunctionDecl *Function, const FunctionDecl *PatternDecl,
7267  const MultiLevelTemplateArgumentList &TemplateArgs);
7268 
7269  /// used by SetupConstraintCheckingTemplateArgumentsAndScope to recursively(in
7270  /// the case of lambdas) set up the LocalInstantiationScope of the current
7271  /// function.
7272  bool SetupConstraintScope(
7273  FunctionDecl *FD, std::optional<ArrayRef<TemplateArgument>> TemplateArgs,
7275 
7276  /// Used during constraint checking, sets up the constraint template argument
7277  /// lists, and calls SetupConstraintScope to set up the
7278  /// LocalInstantiationScope to have the proper set of ParVarDecls configured.
7279  std::optional<MultiLevelTemplateArgumentList>
7280  SetupConstraintCheckingTemplateArgumentsAndScope(
7281  FunctionDecl *FD, std::optional<ArrayRef<TemplateArgument>> TemplateArgs,
7283 
7284 private:
7285  // The current stack of constraint satisfactions, so we can exit-early.
7286  using SatisfactionStackEntryTy =
7287  std::pair<const NamedDecl *, llvm::FoldingSetNodeID>;
7289  SatisfactionStack;
7290 
7291 public:
7293  const llvm::FoldingSetNodeID &ID) {
7294  const NamedDecl *Can = cast<NamedDecl>(D->getCanonicalDecl());
7295  SatisfactionStack.emplace_back(Can, ID);
7296  }
7297 
7298  void PopSatisfactionStackEntry() { SatisfactionStack.pop_back(); }
7299 
7301  const llvm::FoldingSetNodeID &ID) const {
7302  const NamedDecl *Can = cast<NamedDecl>(D->getCanonicalDecl());
7303  return llvm::find(SatisfactionStack,
7304  SatisfactionStackEntryTy{Can, ID}) !=
7305  SatisfactionStack.end();
7306  }
7307 
7308  // Resets the current SatisfactionStack for cases where we are instantiating
7309  // constraints as a 'side effect' of normal instantiation in a way that is not
7310  // indicative of recursive definition.
7313  BackupSatisfactionStack;
7314  Sema &SemaRef;
7315 
7316  public:
7318  SemaRef.SwapSatisfactionStack(BackupSatisfactionStack);
7319  }
7320 
7322  SemaRef.SwapSatisfactionStack(BackupSatisfactionStack);
7323  }
7324  };
7325 
7328  SatisfactionStack.swap(NewSS);
7329  }
7330 
7331  const NormalizedConstraint *
7333  NamedDecl *ConstrainedDecl, ArrayRef<const Expr *> AssociatedConstraints);
7334 
7335  /// \brief Check whether the given declaration's associated constraints are
7336  /// at least as constrained than another declaration's according to the
7337  /// partial ordering of constraints.
7338  ///
7339  /// \param Result If no error occurred, receives the result of true if D1 is
7340  /// at least constrained than D2, and false otherwise.
7341  ///
7342  /// \returns true if an error occurred, false otherwise.
7345  bool &Result);
7346 
7347  /// If D1 was not at least as constrained as D2, but would've been if a pair
7348  /// of atomic constraints involved had been declared in a concept and not
7349  /// repeated in two separate places in code.
7350  /// \returns true if such a diagnostic was emitted, false otherwise.
7353 
7354  /// \brief Check whether the given list of constraint expressions are
7355  /// satisfied (as if in a 'conjunction') given template arguments.
7356  /// \param Template the template-like entity that triggered the constraints
7357  /// check (either a concept or a constrained entity).
7358  /// \param ConstraintExprs a list of constraint expressions, treated as if
7359  /// they were 'AND'ed together.
7360  /// \param TemplateArgLists the list of template arguments to substitute into
7361  /// the constraint expression.
7362  /// \param TemplateIDRange The source range of the template id that
7363  /// caused the constraints check.
7364  /// \param Satisfaction if true is returned, will contain details of the
7365  /// satisfaction, with enough information to diagnose an unsatisfied
7366  /// expression.
7367  /// \returns true if an error occurred and satisfaction could not be checked,
7368  /// false otherwise.
7370  const NamedDecl *Template, ArrayRef<const Expr *> ConstraintExprs,
7371  const MultiLevelTemplateArgumentList &TemplateArgLists,
7372  SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction) {
7373  llvm::SmallVector<Expr *, 4> Converted;
7374  return CheckConstraintSatisfaction(Template, ConstraintExprs, Converted,
7375  TemplateArgLists, TemplateIDRange,
7376  Satisfaction);
7377  }
7378 
7379  /// \brief Check whether the given list of constraint expressions are
7380  /// satisfied (as if in a 'conjunction') given template arguments.
7381  /// Additionally, takes an empty list of Expressions which is populated with
7382  /// the instantiated versions of the ConstraintExprs.
7383  /// \param Template the template-like entity that triggered the constraints
7384  /// check (either a concept or a constrained entity).
7385  /// \param ConstraintExprs a list of constraint expressions, treated as if
7386  /// they were 'AND'ed together.
7387  /// \param ConvertedConstraints a out parameter that will get populated with
7388  /// the instantiated version of the ConstraintExprs if we successfully checked
7389  /// satisfaction.
7390  /// \param TemplateArgList the multi-level list of template arguments to
7391  /// substitute into the constraint expression. This should be relative to the
7392  /// top-level (hence multi-level), since we need to instantiate fully at the
7393  /// time of checking.
7394  /// \param TemplateIDRange The source range of the template id that
7395  /// caused the constraints check.
7396  /// \param Satisfaction if true is returned, will contain details of the
7397  /// satisfaction, with enough information to diagnose an unsatisfied
7398  /// expression.
7399  /// \returns true if an error occurred and satisfaction could not be checked,
7400  /// false otherwise.
7402  const NamedDecl *Template, ArrayRef<const Expr *> ConstraintExprs,
7403  llvm::SmallVectorImpl<Expr *> &ConvertedConstraints,
7404  const MultiLevelTemplateArgumentList &TemplateArgList,
7405  SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction);
7406 
7407  /// \brief Check whether the given non-dependent constraint expression is
7408  /// satisfied. Returns false and updates Satisfaction with the satisfaction
7409  /// verdict if successful, emits a diagnostic and returns true if an error
7410  /// occurred and satisfaction could not be determined.
7411  ///
7412  /// \returns true if an error occurred, false otherwise.
7413  bool CheckConstraintSatisfaction(const Expr *ConstraintExpr,
7414  ConstraintSatisfaction &Satisfaction);
7415 
7416  /// Check whether the given function decl's trailing requires clause is
7417  /// satisfied, if any. Returns false and updates Satisfaction with the
7418  /// satisfaction verdict if successful, emits a diagnostic and returns true if
7419  /// an error occurred and satisfaction could not be determined.
7420  ///
7421  /// \returns true if an error occurred, false otherwise.
7422  bool CheckFunctionConstraints(const FunctionDecl *FD,
7423  ConstraintSatisfaction &Satisfaction,
7424  SourceLocation UsageLoc = SourceLocation(),
7425  bool ForOverloadResolution = false);
7426 
7427  /// \brief Ensure that the given template arguments satisfy the constraints
7428  /// associated with the given template, emitting a diagnostic if they do not.
7429  ///
7430  /// \param Template The template to which the template arguments are being
7431  /// provided.
7432  ///
7433  /// \param TemplateArgs The converted, canonicalized template arguments.
7434  ///
7435  /// \param TemplateIDRange The source range of the template id that
7436  /// caused the constraints check.
7437  ///
7438  /// \returns true if the constrains are not satisfied or could not be checked
7439  /// for satisfaction, false if the constraints are satisfied.
7441  TemplateDecl *Template,
7442  const MultiLevelTemplateArgumentList &TemplateArgs,
7443  SourceRange TemplateIDRange);
7444 
7445  /// \brief Emit diagnostics explaining why a constraint expression was deemed
7446  /// unsatisfied.
7447  /// \param First whether this is the first time an unsatisfied constraint is
7448  /// diagnosed for this error.
7449  void
7451  bool First = true);
7452 
7453  /// \brief Emit diagnostics explaining why a constraint expression was deemed
7454  /// unsatisfied.
7455  void
7457  bool First = true);
7458 
7459  // ParseObjCStringLiteral - Parse Objective-C string literals.
7461  ArrayRef<Expr *> Strings);
7462 
7464 
7465  /// BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the
7466  /// numeric literal expression. Type of the expression will be "NSNumber *"
7467  /// or "id" if NSNumber is unavailable.
7470  bool Value);
7472 
7473  /// BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the
7474  /// '@' prefixed parenthesized expression. The type of the expression will
7475  /// either be "NSNumber *", "NSString *" or "NSValue *" depending on the type
7476  /// of ValueType, which is allowed to be a built-in numeric type, "char *",
7477  /// "const char *" or C structure with attribute 'objc_boxable'.
7479 
7481  Expr *IndexExpr,
7482  ObjCMethodDecl *getterMethod,
7483  ObjCMethodDecl *setterMethod);
7484 
7487 
7489  TypeSourceInfo *EncodedTypeInfo,
7490  SourceLocation RParenLoc);
7492  CXXConversionDecl *Method,
7493  bool HadMultipleCandidates);
7494 
7496  SourceLocation EncodeLoc,
7497  SourceLocation LParenLoc,
7498  ParsedType Ty,
7499  SourceLocation RParenLoc);
7500 
7501  /// ParseObjCSelectorExpression - Build selector expression for \@selector
7503  SourceLocation AtLoc,
7504  SourceLocation SelLoc,
7505  SourceLocation LParenLoc,
7506  SourceLocation RParenLoc,
7507  bool WarnMultipleSelectors);
7508 
7509  /// ParseObjCProtocolExpression - Build protocol expression for \@protocol
7511  SourceLocation AtLoc,
7512  SourceLocation ProtoLoc,
7513  SourceLocation LParenLoc,
7514  SourceLocation ProtoIdLoc,
7515  SourceLocation RParenLoc);
7516 
7517  //===--------------------------------------------------------------------===//
7518  // C++ Declarations
7519  //
7521  SourceLocation ExternLoc,
7522  Expr *LangStr,
7523  SourceLocation LBraceLoc);
7525  Decl *LinkageSpec,
7526  SourceLocation RBraceLoc);
7527 
7528 
7529  //===--------------------------------------------------------------------===//
7530  // C++ Classes
7531  //
7533  bool isCurrentClassName(const IdentifierInfo &II, Scope *S,
7534  const CXXScopeSpec *SS = nullptr);
7535  bool isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS);
7536 
7538  SourceLocation ColonLoc,
7539  const ParsedAttributesView &Attrs);
7540 
7542  Declarator &D,
7543  MultiTemplateParamsArg TemplateParameterLists,
7544  Expr *BitfieldWidth, const VirtSpecifiers &VS,
7545  InClassInitStyle InitStyle);
7546 
7549  SourceLocation EqualLoc,
7550  Expr *Init);
7551 
7552  MemInitResult ActOnMemInitializer(Decl *ConstructorD,
7553  Scope *S,
7554  CXXScopeSpec &SS,
7555  IdentifierInfo *MemberOrBase,
7556  ParsedType TemplateTypeTy,
7557  const DeclSpec &DS,
7558  SourceLocation IdLoc,
7559  SourceLocation LParenLoc,
7560  ArrayRef<Expr *> Args,
7561  SourceLocation RParenLoc,
7562  SourceLocation EllipsisLoc);
7563 
7564  MemInitResult ActOnMemInitializer(Decl *ConstructorD,
7565  Scope *S,
7566  CXXScopeSpec &SS,
7567  IdentifierInfo *MemberOrBase,
7568  ParsedType TemplateTypeTy,
7569  const DeclSpec &DS,
7570  SourceLocation IdLoc,
7571  Expr *InitList,
7572  SourceLocation EllipsisLoc);
7573 
7574  MemInitResult BuildMemInitializer(Decl *ConstructorD,
7575  Scope *S,
7576  CXXScopeSpec &SS,
7577  IdentifierInfo *MemberOrBase,
7578  ParsedType TemplateTypeTy,
7579  const DeclSpec &DS,
7580  SourceLocation IdLoc,
7581  Expr *Init,
7582  SourceLocation EllipsisLoc);
7583 
7585  Expr *Init,
7586  SourceLocation IdLoc);
7587 
7589  TypeSourceInfo *BaseTInfo,
7590  Expr *Init,
7591  CXXRecordDecl *ClassDecl,
7592  SourceLocation EllipsisLoc);
7593 
7595  Expr *Init,
7596  CXXRecordDecl *ClassDecl);
7597 
7598  bool SetDelegatingInitializer(CXXConstructorDecl *Constructor,
7599  CXXCtorInitializer *Initializer);
7600 
7601  bool SetCtorInitializers(
7602  CXXConstructorDecl *Constructor, bool AnyErrors,
7603  ArrayRef<CXXCtorInitializer *> Initializers = std::nullopt);
7604 
7605  void SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation);
7606 
7607 
7608  /// MarkBaseAndMemberDestructorsReferenced - Given a record decl,
7609  /// mark all the non-trivial destructors of its members and bases as
7610  /// referenced.
7612  CXXRecordDecl *Record);
7613 
7614  /// Mark destructors of virtual bases of this class referenced. In the Itanium
7615  /// C++ ABI, this is done when emitting a destructor for any non-abstract
7616  /// class. In the Microsoft C++ ABI, this is done any time a class's
7617  /// destructor is referenced.
7619  SourceLocation Location, CXXRecordDecl *ClassDecl,
7620  llvm::SmallPtrSetImpl<const RecordType *> *DirectVirtualBases = nullptr);
7621 
7622  /// Do semantic checks to allow the complete destructor variant to be emitted
7623  /// when the destructor is defined in another translation unit. In the Itanium
7624  /// C++ ABI, destructor variants are emitted together. In the MS C++ ABI, they
7625  /// can be emitted in separate TUs. To emit the complete variant, run a subset
7626  /// of the checks performed when emitting a regular destructor.
7627  void CheckCompleteDestructorVariant(SourceLocation CurrentLocation,
7628  CXXDestructorDecl *Dtor);
7629 
7630  /// The list of classes whose vtables have been used within
7631  /// this translation unit, and the source locations at which the
7632  /// first use occurred.
7633  typedef std::pair<CXXRecordDecl*, SourceLocation> VTableUse;
7634 
7635  /// The list of vtables that are required but have not yet been
7636  /// materialized.
7638 
7639  /// The set of classes whose vtables have been used within
7640  /// this translation unit, and a bit that will be true if the vtable is
7641  /// required to be emitted (otherwise, it should be emitted only if needed
7642  /// by code generation).
7643  llvm::DenseMap<CXXRecordDecl *, bool> VTablesUsed;
7644 
7645  /// Load any externally-stored vtable uses.
7646  void LoadExternalVTableUses();
7647 
7648  /// Note that the vtable for the given class was used at the
7649  /// given location.
7650  void MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class,
7651  bool DefinitionRequired = false);
7652 
7653  /// Mark the exception specifications of all virtual member functions
7654  /// in the given class as needed.
7656  const CXXRecordDecl *RD);
7657 
7658  /// MarkVirtualMembersReferenced - Will mark all members of the given
7659  /// CXXRecordDecl referenced.
7661  bool ConstexprOnly = false);
7662 
7663  /// Define all of the vtables that have been used in this
7664  /// translation unit and reference any virtual members used by those
7665  /// vtables.
7666  ///
7667  /// \returns true if any work was done, false otherwise.
7668  bool DefineUsedVTables();
7669 
7671 
7672  void ActOnMemInitializers(Decl *ConstructorDecl,
7673  SourceLocation ColonLoc,
7675  bool AnyErrors);
7676 
7677  /// Check class-level dllimport/dllexport attribute. The caller must
7678  /// ensure that referenceDLLExportedClassMethods is called some point later
7679  /// when all outer classes of Class are complete.
7682 
7684 
7686  CXXRecordDecl *Class, Attr *ClassAttr,
7687  ClassTemplateSpecializationDecl *BaseTemplateSpec,
7688  SourceLocation BaseLoc);
7689 
7690  /// Add gsl::Pointer attribute to std::container::iterator
7691  /// \param ND The declaration that introduces the name
7692  /// std::container::iterator. \param UnderlyingRecord The record named by ND.
7693  void inferGslPointerAttribute(NamedDecl *ND, CXXRecordDecl *UnderlyingRecord);
7694 
7695  /// Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.
7697 
7698  /// Add [[gsl::Pointer]] attributes for std:: types.
7700 
7701  void CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record);
7702 
7703  /// Check that the C++ class annoated with "trivial_abi" satisfies all the
7704  /// conditions that are needed for the attribute to have an effect.
7706 
7708  Decl *TagDecl, SourceLocation LBrac,
7709  SourceLocation RBrac,
7710  const ParsedAttributesView &AttrList);
7713 
7715  unsigned ActOnReenterTemplateScope(Decl *Template,
7716  llvm::function_ref<Scope *()> EnterScope);
7719  void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param);
7724  CachedTokens &Toks);
7727 
7729  Expr *AssertExpr,
7730  Expr *AssertMessageExpr,
7731  SourceLocation RParenLoc);
7733  Expr *AssertExpr,
7734  StringLiteral *AssertMessageExpr,
7735  SourceLocation RParenLoc,
7736  bool Failed);
7737  void DiagnoseStaticAssertDetails(const Expr *E);
7738 
7740  SourceLocation FriendLoc,
7741  TypeSourceInfo *TSInfo);
7742  Decl *ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS,
7743  MultiTemplateParamsArg TemplateParams);
7745  MultiTemplateParamsArg TemplateParams);
7746 
7748  StorageClass& SC);
7749  void CheckConstructor(CXXConstructorDecl *Constructor);
7751  StorageClass& SC);
7752  bool CheckDestructor(CXXDestructorDecl *Destructor);
7754  StorageClass& SC);
7757  StorageClass &SC);
7759 
7761 
7763  CXXSpecialMember CSM,
7764  SourceLocation DefaultLoc);
7766 
7773 
7774  //===--------------------------------------------------------------------===//
7775  // C++ Derived Classes
7776  //
7777 
7778  /// ActOnBaseSpecifier - Parsed a base specifier
7780  SourceRange SpecifierRange,
7781  bool Virtual, AccessSpecifier Access,
7782  TypeSourceInfo *TInfo,
7783  SourceLocation EllipsisLoc);
7784 
7785  BaseResult ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange,
7786  const ParsedAttributesView &Attrs, bool Virtual,
7787  AccessSpecifier Access, ParsedType basetype,
7788  SourceLocation BaseLoc,
7789  SourceLocation EllipsisLoc);
7790 
7791  bool AttachBaseSpecifiers(CXXRecordDecl *Class,
7793  void ActOnBaseSpecifiers(Decl *ClassDecl,
7795 
7796  bool IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base);
7797  bool IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base,
7798  CXXBasePaths &Paths);
7799 
7800  // FIXME: I don't like this name.
7801  void BuildBasePathArray(const CXXBasePaths &Paths, CXXCastPath &BasePath);
7802 
7804  SourceLocation Loc, SourceRange Range,
7805  CXXCastPath *BasePath = nullptr,
7806  bool IgnoreAccess = false);
7808  unsigned InaccessibleBaseID,
7809  unsigned AmbiguousBaseConvID,
7810  SourceLocation Loc, SourceRange Range,
7811  DeclarationName Name,
7812  CXXCastPath *BasePath,
7813  bool IgnoreAccess = false);
7814 
7816 
7818  const CXXMethodDecl *Old);
7819 
7820  /// CheckOverridingFunctionReturnType - Checks whether the return types are
7821  /// covariant, according to C++ [class.virtual]p5.
7823  const CXXMethodDecl *Old);
7824 
7825  /// CheckOverridingFunctionExceptionSpec - Checks whether the exception
7826  /// spec is a subset of base spec.
7828  const CXXMethodDecl *Old);
7829 
7830  bool CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange);
7831 
7832  /// CheckOverrideControl - Check C++11 override control semantics.
7834 
7835  /// DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was
7836  /// not used in the declaration of an overriding method.
7837  void DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent);
7838 
7839  /// CheckForFunctionMarkedFinal - Checks whether a virtual member function
7840  /// overrides a virtual member function marked 'final', according to
7841  /// C++11 [class.virtual]p4.
7843  const CXXMethodDecl *Old);
7844 
7845 
7846  //===--------------------------------------------------------------------===//
7847  // C++ Access Control
7848  //
7849 
7855  };
7856 
7857  bool SetMemberAccessSpecifier(NamedDecl *MemberDecl,
7858  NamedDecl *PrevMemberDecl,
7859  AccessSpecifier LexicalAS);
7860 
7862  DeclAccessPair FoundDecl);
7864  DeclAccessPair FoundDecl);
7866  SourceRange PlacementRange,
7867  CXXRecordDecl *NamingClass,
7868  DeclAccessPair FoundDecl,
7869  bool Diagnose = true);
7871  CXXConstructorDecl *D,
7872  DeclAccessPair FoundDecl,
7873  const InitializedEntity &Entity,
7874  bool IsCopyBindingRefToTemp = false);
7876  CXXConstructorDecl *D,
7877  DeclAccessPair FoundDecl,
7878  const InitializedEntity &Entity,
7879  const PartialDiagnostic &PDiag);
7881  CXXDestructorDecl *Dtor,
7882  const PartialDiagnostic &PDiag,
7883  QualType objectType = QualType());
7886  CXXRecordDecl *NamingClass,
7887  DeclAccessPair Found);
7888  AccessResult
7890  CXXRecordDecl *DecomposedClass,
7891  DeclAccessPair Field);
7893  const SourceRange &,
7894  DeclAccessPair FoundDecl);
7896  Expr *ObjectExpr,
7897  Expr *ArgExpr,
7898  DeclAccessPair FoundDecl);
7900  ArrayRef<Expr *> ArgExprs,
7901  DeclAccessPair FoundDecl);
7903  DeclAccessPair FoundDecl);
7905  QualType Base, QualType Derived,
7906  const CXXBasePath &Path,
7907  unsigned DiagID,
7908  bool ForceCheck = false,
7909  bool ForceUnprivileged = false);
7910  void CheckLookupAccess(const LookupResult &R);
7911  bool IsSimplyAccessible(NamedDecl *Decl, CXXRecordDecl *NamingClass,
7912  QualType BaseType);
7913  bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass,
7914  DeclAccessPair Found, QualType ObjectType,
7915  SourceLocation Loc,
7916  const PartialDiagnostic &Diag);
7918  DeclAccessPair Found,
7919  QualType ObjectType) {
7920  return isMemberAccessibleForDeletion(NamingClass, Found, ObjectType,
7921  SourceLocation(), PDiag());
7922  }
7923 
7925  const MultiLevelTemplateArgumentList &TemplateArgs);
7926  void PerformDependentDiagnostics(const DeclContext *Pattern,
7927  const MultiLevelTemplateArgumentList &TemplateArgs);
7928 
7930 
7931  /// When true, access checking violations are treated as SFINAE
7932  /// failures rather than hard errors.
7934 
7944  };
7945 
7946  bool isAbstractType(SourceLocation Loc, QualType T);
7948  TypeDiagnoser &Diagnoser);
7949  template <typename... Ts>
7950  bool RequireNonAbstractType(SourceLocation Loc, QualType T, unsigned DiagID,
7951  const Ts &...Args) {
7952  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
7953  return RequireNonAbstractType(Loc, T, Diagnoser);
7954  }
7955 
7956  void DiagnoseAbstractType(const CXXRecordDecl *RD);
7957 
7958  //===--------------------------------------------------------------------===//
7959  // C++ Overloaded Operators [C++ 13.5]
7960  //
7961 
7963 
7965 
7966  //===--------------------------------------------------------------------===//
7967  // C++ Templates [C++ 14]
7968  //
7970  bool AllowFunctionTemplates = true,
7971  bool AllowDependent = true);
7973  bool AllowFunctionTemplates = true,
7974  bool AllowDependent = true,
7975  bool AllowNonTemplateFunctions = false);
7976  /// Try to interpret the lookup result D as a template-name.
7977  ///
7978  /// \param D A declaration found by name lookup.
7979  /// \param AllowFunctionTemplates Whether function templates should be
7980  /// considered valid results.
7981  /// \param AllowDependent Whether unresolved using declarations (that might
7982  /// name templates) should be considered valid results.
7984  bool AllowFunctionTemplates = true,
7985  bool AllowDependent = true);
7986 
7988  /// Whether and why a template name is required in this lookup.
7990  public:
7991  /// Template name is required if TemplateKWLoc is valid.
7993  : TemplateKW(TemplateKWLoc) {}
7994  /// Template name is unconditionally required.
7996 
7998  return TemplateKW.value_or(SourceLocation());
7999  }
8000  bool hasTemplateKeyword() const { return getTemplateKeywordLoc().isValid(); }
8001  bool isRequired() const { return TemplateKW != SourceLocation(); }
8002  explicit operator bool() const { return isRequired(); }
8003 
8004  private:
8005  std::optional<SourceLocation> TemplateKW;
8006  };
8007 
8008  enum class AssumedTemplateKind {
8009  /// This is not assumed to be a template name.
8010  None,
8011  /// This is assumed to be a template name because lookup found nothing.
8012  FoundNothing,
8013  /// This is assumed to be a template name because lookup found one or more
8014  /// functions (but no function templates).
8016  };
8017  bool LookupTemplateName(
8018  LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType,
8019  bool EnteringContext, bool &MemberOfUnknownSpecialization,
8020  RequiredTemplateKind RequiredTemplate = SourceLocation(),
8021  AssumedTemplateKind *ATK = nullptr, bool AllowTypoCorrection = true);
8022 
8024  CXXScopeSpec &SS,
8025  bool hasTemplateKeyword,
8026  const UnqualifiedId &Name,
8027  ParsedType ObjectType,
8028  bool EnteringContext,
8029  TemplateTy &Template,
8030  bool &MemberOfUnknownSpecialization,
8031  bool Disambiguation = false);
8032 
8033  /// Try to resolve an undeclared template name as a type template.
8034  ///
8035  /// Sets II to the identifier corresponding to the template name, and updates
8036  /// Name to a corresponding (typo-corrected) type template name and TNK to
8037  /// the corresponding kind, if possible.
8039  TemplateNameKind &TNK,
8040  SourceLocation NameLoc,
8041  IdentifierInfo *&II);
8042 
8044  SourceLocation NameLoc,
8045  bool Diagnose = true);
8046 
8047  /// Determine whether a particular identifier might be the name in a C++1z
8048  /// deduction-guide declaration.
8049  bool isDeductionGuideName(Scope *S, const IdentifierInfo &Name,
8050  SourceLocation NameLoc,
8051  ParsedTemplateTy *Template = nullptr);
8052 
8054  SourceLocation IILoc,
8055  Scope *S,
8056  const CXXScopeSpec *SS,
8057  TemplateTy &SuggestedTemplate,
8058  TemplateNameKind &SuggestedKind);
8059 
8060  bool DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation,
8061  NamedDecl *Instantiation,
8062  bool InstantiatedFromMember,
8063  const NamedDecl *Pattern,
8064  const NamedDecl *PatternDef,
8066  bool Complain = true);
8067 
8070 
8071  NamedDecl *ActOnTypeParameter(Scope *S, bool Typename,
8072  SourceLocation EllipsisLoc,
8073  SourceLocation KeyLoc,
8074  IdentifierInfo *ParamName,
8075  SourceLocation ParamNameLoc,
8076  unsigned Depth, unsigned Position,
8077  SourceLocation EqualLoc,
8078  ParsedType DefaultArg, bool HasTypeConstraint);
8079 
8080  bool ActOnTypeConstraint(const CXXScopeSpec &SS,
8082  TemplateTypeParmDecl *ConstrainedParameter,
8083  SourceLocation EllipsisLoc);
8084  bool BuildTypeConstraint(const CXXScopeSpec &SS,
8086  TemplateTypeParmDecl *ConstrainedParameter,
8087  SourceLocation EllipsisLoc,
8088  bool AllowUnexpandedPack);
8089 
8091  DeclarationNameInfo NameInfo,
8092  ConceptDecl *NamedConcept,
8093  const TemplateArgumentListInfo *TemplateArgs,
8094  TemplateTypeParmDecl *ConstrainedParameter,
8095  SourceLocation EllipsisLoc);
8096 
8098  NonTypeTemplateParmDecl *ConstrainedParameter,
8099  SourceLocation EllipsisLoc);
8100 
8102 
8104  SourceLocation Loc);
8106 
8108  unsigned Depth,
8109  unsigned Position,
8110  SourceLocation EqualLoc,
8111  Expr *DefaultArg);
8113  SourceLocation TmpLoc,
8114  TemplateParameterList *Params,
8115  SourceLocation EllipsisLoc,
8116  IdentifierInfo *ParamName,
8117  SourceLocation ParamNameLoc,
8118  unsigned Depth,
8119  unsigned Position,
8120  SourceLocation EqualLoc,
8121  ParsedTemplateArgument DefaultArg);
8122 
8125  SourceLocation ExportLoc,
8126  SourceLocation TemplateLoc,
8127  SourceLocation LAngleLoc,
8128  ArrayRef<NamedDecl *> Params,
8129  SourceLocation RAngleLoc,
8130  Expr *RequiresClause);
8131 
8132  /// The context in which we are checking a template parameter list.
8142  };
8143 
8145  TemplateParameterList *OldParams,
8147  SkipBodyInfo *SkipBody = nullptr);
8149  SourceLocation DeclStartLoc, SourceLocation DeclLoc,
8150  const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId,
8152  bool IsFriend, bool &IsMemberSpecialization, bool &Invalid,
8153  bool SuppressDiagnostic = false);
8154 
8156  Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
8157  CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc,
8158  const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams,
8159  AccessSpecifier AS, SourceLocation ModulePrivateLoc,
8160  SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists,
8161  TemplateParameterList **OuterTemplateParamLists,
8162  SkipBodyInfo *SkipBody = nullptr);
8163 
8165  QualType NTTPType,
8166  SourceLocation Loc);
8167 
8168  /// Get a template argument mapping the given template parameter to itself,
8169  /// e.g. for X in \c template<int X>, this would return an expression template
8170  /// argument referencing X.
8172  SourceLocation Location);
8173 
8176 
8178 
8180 
8182  SourceLocation TemplateLoc,
8183  TemplateArgumentListInfo &TemplateArgs);
8184 
8185  TypeResult
8186  ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
8187  TemplateTy Template, IdentifierInfo *TemplateII,
8188  SourceLocation TemplateIILoc, SourceLocation LAngleLoc,
8189  ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc,
8190  bool IsCtorOrDtorName = false, bool IsClassName = false,
8191  ImplicitTypenameContext AllowImplicitTypename =
8193 
8194  /// Parsed an elaborated-type-specifier that refers to a template-id,
8195  /// such as \c class T::template apply<U>.
8197  TypeSpecifierType TagSpec,
8198  SourceLocation TagLoc,
8199  CXXScopeSpec &SS,
8200  SourceLocation TemplateKWLoc,
8201  TemplateTy TemplateD,
8202  SourceLocation TemplateLoc,
8203  SourceLocation LAngleLoc,
8204  ASTTemplateArgsPtr TemplateArgsIn,
8205  SourceLocation RAngleLoc);
8206 
8208  Scope *S, Declarator &D, TypeSourceInfo *DI,
8209  SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams,
8211 
8212  /// Get the specialization of the given variable template corresponding to
8213  /// the specified argument list, or a null-but-valid result if the arguments
8214  /// are dependent.
8216  SourceLocation TemplateLoc,
8217  SourceLocation TemplateNameLoc,
8218  const TemplateArgumentListInfo &TemplateArgs);
8219 
8220  /// Form a reference to the specialization of the given variable template
8221  /// corresponding to the specified argument list, or a null-but-valid result
8222  /// if the arguments are dependent.
8224  const DeclarationNameInfo &NameInfo,
8225  VarTemplateDecl *Template,
8226  SourceLocation TemplateLoc,
8227  const TemplateArgumentListInfo *TemplateArgs);
8228 
8229  ExprResult
8231  SourceLocation TemplateKWLoc,
8232  const DeclarationNameInfo &ConceptNameInfo,
8233  NamedDecl *FoundDecl, ConceptDecl *NamedConcept,
8234  const TemplateArgumentListInfo *TemplateArgs);
8235 
8237 
8239  SourceLocation TemplateKWLoc,
8240  LookupResult &R,
8241  bool RequiresADL,
8242  const TemplateArgumentListInfo *TemplateArgs);
8243 
8245  SourceLocation TemplateKWLoc,
8246  const DeclarationNameInfo &NameInfo,
8247  const TemplateArgumentListInfo *TemplateArgs);
8248 
8250  Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
8251  const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext,
8252  TemplateTy &Template, bool AllowInjectedClassName = false);
8253 
8255  Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
8256  SourceLocation ModulePrivateLoc, CXXScopeSpec &SS,
8257  TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr,
8258  MultiTemplateParamsArg TemplateParameterLists,
8259  SkipBodyInfo *SkipBody = nullptr);
8260 
8262  TemplateDecl *PrimaryTemplate,
8263  unsigned NumExplicitArgs,
8269 
8271  MultiTemplateParamsArg TemplateParameterLists,
8272  Declarator &D);
8273 
8274  bool
8277  NamedDecl *PrevDecl,
8279  SourceLocation PrevPtOfInstantiation,
8280  bool &SuppressNew);
8281 
8283  const TemplateArgumentListInfo &ExplicitTemplateArgs,
8285 
8287  FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs,
8288  LookupResult &Previous, bool QualifiedFriend = false);
8291 
8293  Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc,
8294  unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS,
8295  TemplateTy Template, SourceLocation TemplateNameLoc,
8296  SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs,
8297  SourceLocation RAngleLoc, const ParsedAttributesView &Attr);
8298 
8300  SourceLocation TemplateLoc,
8301  unsigned TagSpec, SourceLocation KWLoc,
8302  CXXScopeSpec &SS, IdentifierInfo *Name,
8303  SourceLocation NameLoc,
8304  const ParsedAttributesView &Attr);
8305 
8307  SourceLocation ExternLoc,
8308  SourceLocation TemplateLoc,
8309  Declarator &D);
8310 
8312  TemplateDecl *Template, SourceLocation TemplateLoc,
8313  SourceLocation RAngleLoc, Decl *Param,
8314  ArrayRef<TemplateArgument> SugaredConverted,
8315  ArrayRef<TemplateArgument> CanonicalConverted, bool &HasDefaultArg);
8316 
8317  /// Specifies the context in which a particular template
8318  /// argument is being checked.
8320  /// The template argument was specified in the code or was
8321  /// instantiated with some deduced template arguments.
8323 
8324  /// The template argument was deduced via template argument
8325  /// deduction.
8327 
8328  /// The template argument was deduced from an array bound
8329  /// via template argument deduction.
8331  };
8332 
8333  bool
8335  NamedDecl *Template, SourceLocation TemplateLoc,
8336  SourceLocation RAngleLoc, unsigned ArgumentPackIndex,
8337  SmallVectorImpl<TemplateArgument> &SugaredConverted,
8338  SmallVectorImpl<TemplateArgument> &CanonicalConverted,
8340 
8341  /// Check that the given template arguments can be provided to
8342  /// the given template, converting the arguments along the way.
8343  ///
8344  /// \param Template The template to which the template arguments are being
8345  /// provided.
8346  ///
8347  /// \param TemplateLoc The location of the template name in the source.
8348  ///
8349  /// \param TemplateArgs The list of template arguments. If the template is
8350  /// a template template parameter, this function may extend the set of
8351  /// template arguments to also include substituted, defaulted template
8352  /// arguments.
8353  ///
8354  /// \param PartialTemplateArgs True if the list of template arguments is
8355  /// intentionally partial, e.g., because we're checking just the initial
8356  /// set of template arguments.
8357  ///
8358  /// \param Converted Will receive the converted, canonicalized template
8359  /// arguments.
8360  ///
8361  /// \param UpdateArgsWithConversions If \c true, update \p TemplateArgs to
8362  /// contain the converted forms of the template arguments as written.
8363  /// Otherwise, \p TemplateArgs will not be modified.
8364  ///
8365  /// \param ConstraintsNotSatisfied If provided, and an error occurred, will
8366  /// receive true if the cause for the error is the associated constraints of
8367  /// the template not being satisfied by the template arguments.
8368  ///
8369  /// \returns true if an error occurred, false otherwise.
8371  TemplateDecl *Template, SourceLocation TemplateLoc,
8372  TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs,
8373  SmallVectorImpl<TemplateArgument> &SugaredConverted,
8374  SmallVectorImpl<TemplateArgument> &CanonicalConverted,
8375  bool UpdateArgsWithConversions = true,
8376  bool *ConstraintsNotSatisfied = nullptr);
8377 
8380  SmallVectorImpl<TemplateArgument> &SugaredConverted,
8381  SmallVectorImpl<TemplateArgument> &CanonicalConverted);
8382 
8385  QualType InstantiatedParamType, Expr *Arg,
8386  TemplateArgument &SugaredConverted,
8387  TemplateArgument &CanonicalConverted,
8390  TemplateParameterList *Params,
8391  TemplateArgumentLoc &Arg);
8392 
8393  ExprResult
8395  QualType ParamType,
8396  SourceLocation Loc);
8397  ExprResult
8399  SourceLocation Loc);
8400 
8401  /// Enumeration describing how template parameter lists are compared
8402  /// for equality.
8404  /// We are matching the template parameter lists of two templates
8405  /// that might be redeclarations.
8406  ///
8407  /// \code
8408  /// template<typename T> struct X;
8409  /// template<typename T> struct X;
8410  /// \endcode
8412 
8413  /// We are matching the template parameter lists of two template
8414  /// template parameters as part of matching the template parameter lists
8415  /// of two templates that might be redeclarations.
8416  ///
8417  /// \code
8418  /// template<template<int I> class TT> struct X;
8419  /// template<template<int Value> class Other> struct X;
8420  /// \endcode
8422 
8423  /// We are matching the template parameter lists of a template
8424  /// template argument against the template parameter lists of a template
8425  /// template parameter.
8426  ///
8427  /// \code
8428  /// template<template<int Value> class Metafun> struct X;
8429  /// template<int Value> struct integer_c;
8430  /// X<integer_c> xic;
8431  /// \endcode
8433  };
8434 
8436  const NamedDecl *NewInstFrom, TemplateParameterList *New,
8437  const NamedDecl *OldInstFrom, TemplateParameterList *Old, bool Complain,
8439  SourceLocation TemplateArgLoc = SourceLocation(),
8440  bool PartialOrdering = false);
8441 
8443  TemplateParameterList *New, TemplateParameterList *Old, bool Complain,
8445  SourceLocation TemplateArgLoc = SourceLocation(),
8446  bool PartialOrdering = false) {
8447  return TemplateParameterListsAreEqual(nullptr, New, nullptr, Old, Complain,
8448  Kind, TemplateArgLoc,
8449  PartialOrdering);
8450  }
8451 
8452  bool CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams);
8453 
8454  /// Called when the parser has parsed a C++ typename
8455  /// specifier, e.g., "typename T::type".
8456  ///
8457  /// \param S The scope in which this typename type occurs.
8458  /// \param TypenameLoc the location of the 'typename' keyword
8459  /// \param SS the nested-name-specifier following the typename (e.g., 'T::').
8460  /// \param II the identifier we're retrieving (e.g., 'type' in the example).
8461  /// \param IdLoc the location of the identifier.
8462  /// \param IsImplicitTypename context where T::type refers to a type.
8464  Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS,
8465  const IdentifierInfo &II, SourceLocation IdLoc,
8467 
8468  /// Called when the parser has parsed a C++ typename
8469  /// specifier that ends in a template-id, e.g.,
8470  /// "typename MetaFun::template apply<T1, T2>".
8471  ///
8472  /// \param S The scope in which this typename type occurs.
8473  /// \param TypenameLoc the location of the 'typename' keyword
8474  /// \param SS the nested-name-specifier following the typename (e.g., 'T::').
8475  /// \param TemplateLoc the location of the 'template' keyword, if any.
8476  /// \param TemplateName The template name.
8477  /// \param TemplateII The identifier used to name the template.
8478  /// \param TemplateIILoc The location of the template name.
8479  /// \param LAngleLoc The location of the opening angle bracket ('<').
8480  /// \param TemplateArgs The template arguments.
8481  /// \param RAngleLoc The location of the closing angle bracket ('>').
8482  TypeResult
8483  ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
8484  const CXXScopeSpec &SS,
8485  SourceLocation TemplateLoc,
8487  IdentifierInfo *TemplateII,
8488  SourceLocation TemplateIILoc,
8489  SourceLocation LAngleLoc,
8490  ASTTemplateArgsPtr TemplateArgs,
8491  SourceLocation RAngleLoc);
8492 
8494  SourceLocation KeywordLoc,
8495  NestedNameSpecifierLoc QualifierLoc,
8496  const IdentifierInfo &II,
8497  SourceLocation IILoc,
8498  TypeSourceInfo **TSI,
8499  bool DeducedTSTContext);
8500 
8502  SourceLocation KeywordLoc,
8503  NestedNameSpecifierLoc QualifierLoc,
8504  const IdentifierInfo &II,
8505  SourceLocation IILoc,
8506  bool DeducedTSTContext = true);
8507 
8508 
8510  SourceLocation Loc,
8511  DeclarationName Name);
8513 
8516  TemplateParameterList *Params);
8517 
8518  std::string
8520  const TemplateArgumentList &Args);
8521 
8522  std::string
8524  const TemplateArgument *Args,
8525  unsigned NumArgs);
8526 
8527  //===--------------------------------------------------------------------===//
8528  // C++ Concepts
8529  //===--------------------------------------------------------------------===//
8531  Scope *S, MultiTemplateParamsArg TemplateParameterLists,
8532  IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr);
8533 
8535  bool &AddToScope);
8536 
8538  ActOnStartRequiresExpr(SourceLocation RequiresKWLoc,
8539  ArrayRef<ParmVarDecl *> LocalParameters,
8540  Scope *BodyScope);
8541  void ActOnFinishRequiresExpr();
8544  SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc,
8545  IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId);
8547  SourceLocation NoexceptLoc);
8550  Expr *E, SourceLocation NoexceptLoc, CXXScopeSpec &SS,
8555  Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc,
8556  concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement);
8560  bool IsSatisfied, SourceLocation NoexceptLoc,
8561  concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement);
8568  BuildNestedRequirement(StringRef InvalidConstraintEntity,
8569  const ASTConstraintSatisfaction &Satisfaction);
8571  RequiresExprBodyDecl *Body,
8572  ArrayRef<ParmVarDecl *> LocalParameters,
8573  ArrayRef<concepts::Requirement *> Requirements,
8574  SourceLocation ClosingBraceLoc);
8575 
8576  //===--------------------------------------------------------------------===//
8577  // C++ Variadic Templates (C++0x [temp.variadic])
8578  //===--------------------------------------------------------------------===//
8579 
8580  /// Determine whether an unexpanded parameter pack might be permitted in this
8581  /// location. Useful for error recovery.
8583 
8584  /// The context in which an unexpanded parameter pack is
8585  /// being diagnosed.
8586  ///
8587  /// Note that the values of this enumeration line up with the first
8588  /// argument to the \c err_unexpanded_parameter_pack diagnostic.
8590  /// An arbitrary expression.
8592 
8593  /// The base type of a class type.
8595 
8596  /// The type of an arbitrary declaration.
8598 
8599  /// The type of a data member.
8601 
8602  /// The size of a bit-field.
8604 
8605  /// The expression in a static assertion.
8607 
8608  /// The fixed underlying type of an enumeration.
8610 
8611  /// The enumerator value.
8613 
8614  /// A using declaration.
8616 
8617  /// A friend declaration.
8619 
8620  /// A declaration qualifier.
8622 
8623  /// An initializer.
8625 
8626  /// A default argument.
8628 
8629  /// The type of a non-type template parameter.
8631 
8632  /// The type of an exception.
8634 
8635  /// Partial specialization.
8637 
8638  /// Microsoft __if_exists.
8640 
8641  /// Microsoft __if_not_exists.
8643 
8644  /// Lambda expression.
8646 
8647  /// Block expression.
8649 
8650  /// A type constraint.
8652 
8653  // A requirement in a requires-expression.
8655 
8656  // A requires-clause.
8658  };
8659 
8660  /// Diagnose unexpanded parameter packs.
8661  ///
8662  /// \param Loc The location at which we should emit the diagnostic.
8663  ///
8664  /// \param UPPC The context in which we are diagnosing unexpanded
8665  /// parameter packs.
8666  ///
8667  /// \param Unexpanded the set of unexpanded parameter packs.
8668  ///
8669  /// \returns true if an error occurred, false otherwise.
8673 
8674  /// If the given type contains an unexpanded parameter pack,
8675  /// diagnose the error.
8676  ///
8677  /// \param Loc The source location where a diagnostc should be emitted.
8678  ///
8679  /// \param T The type that is being checked for unexpanded parameter
8680  /// packs.
8681  ///
8682  /// \returns true if an error occurred, false otherwise.
8685 
8686  /// If the given expression contains an unexpanded parameter
8687  /// pack, diagnose the error.
8688  ///
8689  /// \param E The expression that is being checked for unexpanded
8690  /// parameter packs.
8691  ///
8692  /// \returns true if an error occurred, false otherwise.
8695 
8696  /// If the given requirees-expression contains an unexpanded reference to one
8697  /// of its own parameter packs, diagnose the error.
8698  ///
8699  /// \param RE The requiress-expression that is being checked for unexpanded
8700  /// parameter packs.
8701  ///
8702  /// \returns true if an error occurred, false otherwise.
8704 
8705  /// If the given nested-name-specifier contains an unexpanded
8706  /// parameter pack, diagnose the error.
8707  ///
8708  /// \param SS The nested-name-specifier that is being checked for
8709  /// unexpanded parameter packs.
8710  ///
8711  /// \returns true if an error occurred, false otherwise.
8714 
8715  /// If the given name contains an unexpanded parameter pack,
8716  /// diagnose the error.
8717  ///
8718  /// \param NameInfo The name (with source location information) that
8719  /// is being checked for unexpanded parameter packs.
8720  ///
8721  /// \returns true if an error occurred, false otherwise.
8724 
8725  /// If the given template name contains an unexpanded parameter pack,
8726  /// diagnose the error.
8727  ///
8728  /// \param Loc The location of the template name.
8729  ///
8730  /// \param Template The template name that is being checked for unexpanded
8731  /// parameter packs.
8732  ///
8733  /// \returns true if an error occurred, false otherwise.
8735  TemplateName Template,
8737 
8738  /// If the given template argument contains an unexpanded parameter
8739  /// pack, diagnose the error.
8740  ///
8741  /// \param Arg The template argument that is being checked for unexpanded
8742  /// parameter packs.
8743  ///
8744  /// \returns true if an error occurred, false otherwise.
8747 
8748  /// Collect the set of unexpanded parameter packs within the given
8749  /// template argument.
8750  ///
8751  /// \param Arg The template argument that will be traversed to find
8752  /// unexpanded parameter packs.
8755 
8756  /// Collect the set of unexpanded parameter packs within the given
8757  /// template argument.
8758  ///
8759  /// \param Arg The template argument that will be traversed to find
8760  /// unexpanded parameter packs.
8763 
8764  /// Collect the set of unexpanded parameter packs within the given
8765  /// type.
8766  ///
8767  /// \param T The type that will be traversed to find
8768  /// unexpanded parameter packs.
8771 
8772  /// Collect the set of unexpanded parameter packs within the given
8773  /// type.
8774  ///
8775  /// \param TL The type that will be traversed to find
8776  /// unexpanded parameter packs.
8779 
8780  /// Collect the set of unexpanded parameter packs within the given
8781  /// nested-name-specifier.
8782  ///
8783  /// \param NNS The nested-name-specifier that will be traversed to find
8784  /// unexpanded parameter packs.
8787 
8788  /// Collect the set of unexpanded parameter packs within the given
8789  /// name.
8790  ///
8791  /// \param NameInfo The name that will be traversed to find
8792  /// unexpanded parameter packs.
8795 
8796  /// Invoked when parsing a template argument followed by an
8797  /// ellipsis, which creates a pack expansion.
8798  ///
8799  /// \param Arg The template argument preceding the ellipsis, which
8800  /// may already be invalid.
8801  ///
8802  /// \param EllipsisLoc The location of the ellipsis.
8804  SourceLocation EllipsisLoc);
8805 
8806  /// Invoked when parsing a type followed by an ellipsis, which
8807  /// creates a pack expansion.
8808  ///
8809  /// \param Type The type preceding the ellipsis, which will become
8810  /// the pattern of the pack expansion.
8811  ///
8812  /// \param EllipsisLoc The location of the ellipsis.
8814 
8815  /// Construct a pack expansion type from the pattern of the pack
8816  /// expansion.
8818  SourceLocation EllipsisLoc,
8819  std::optional<unsigned> NumExpansions);
8820 
8821  /// Construct a pack expansion type from the pattern of the pack
8822  /// expansion.
8823  QualType CheckPackExpansion(QualType Pattern, SourceRange PatternRange,
8824  SourceLocation EllipsisLoc,
8825  std::optional<unsigned> NumExpansions);
8826 
8827  /// Invoked when parsing an expression followed by an ellipsis, which
8828  /// creates a pack expansion.
8829  ///
8830  /// \param Pattern The expression preceding the ellipsis, which will become
8831  /// the pattern of the pack expansion.
8832  ///
8833  /// \param EllipsisLoc The location of the ellipsis.
8834  ExprResult ActOnPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc);
8835 
8836  /// Invoked when parsing an expression followed by an ellipsis, which
8837  /// creates a pack expansion.
8838  ///
8839  /// \param Pattern The expression preceding the ellipsis, which will become
8840  /// the pattern of the pack expansion.
8841  ///
8842  /// \param EllipsisLoc The location of the ellipsis.
8843  ExprResult CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc,
8844  std::optional<unsigned> NumExpansions);
8845 
8846  /// Determine whether we could expand a pack expansion with the
8847  /// given set of parameter packs into separate arguments by repeatedly
8848  /// transforming the pattern.
8849  ///
8850  /// \param EllipsisLoc The location of the ellipsis that identifies the
8851  /// pack expansion.
8852  ///
8853  /// \param PatternRange The source range that covers the entire pattern of
8854  /// the pack expansion.
8855  ///
8856  /// \param Unexpanded The set of unexpanded parameter packs within the
8857  /// pattern.
8858  ///
8859  /// \param ShouldExpand Will be set to \c true if the transformer should
8860  /// expand the corresponding pack expansions into separate arguments. When
8861  /// set, \c NumExpansions must also be set.
8862  ///
8863  /// \param RetainExpansion Whether the caller should add an unexpanded
8864  /// pack expansion after all of the expanded arguments. This is used
8865  /// when extending explicitly-specified template argument packs per
8866  /// C++0x [temp.arg.explicit]p9.
8867  ///
8868  /// \param NumExpansions The number of separate arguments that will be in
8869  /// the expanded form of the corresponding pack expansion. This is both an
8870  /// input and an output parameter, which can be set by the caller if the
8871  /// number of expansions is known a priori (e.g., due to a prior substitution)
8872  /// and will be set by the callee when the number of expansions is known.
8873  /// The callee must set this value when \c ShouldExpand is \c true; it may
8874  /// set this value in other cases.
8875  ///
8876  /// \returns true if an error occurred (e.g., because the parameter packs
8877  /// are to be instantiated with arguments of different lengths), false
8878  /// otherwise. If false, \c ShouldExpand (and possibly \c NumExpansions)
8879  /// must be set.
8881  SourceLocation EllipsisLoc, SourceRange PatternRange,
8883  const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand,
8884  bool &RetainExpansion, std::optional<unsigned> &NumExpansions);
8885 
8886  /// Determine the number of arguments in the given pack expansion
8887  /// type.
8888  ///
8889  /// This routine assumes that the number of arguments in the expansion is
8890  /// consistent across all of the unexpanded parameter packs in its pattern.
8891  ///
8892  /// Returns an empty Optional if the type can't be expanded.
8893  std::optional<unsigned> getNumArgumentsInExpansion(
8894  QualType T, const MultiLevelTemplateArgumentList &TemplateArgs);
8895 
8896  /// Determine whether the given declarator contains any unexpanded
8897  /// parameter packs.
8898  ///
8899  /// This routine is used by the parser to disambiguate function declarators
8900  /// with an ellipsis prior to the ')', e.g.,
8901  ///
8902  /// \code
8903  /// void f(T...);
8904  /// \endcode
8905  ///
8906  /// To determine whether we have an (unnamed) function parameter pack or
8907  /// a variadic function.
8908  ///
8909  /// \returns true if the declarator contains any unexpanded parameter packs,
8910  /// false otherwise.
8912 
8913  /// Returns the pattern of the pack expansion for a template argument.
8914  ///
8915  /// \param OrigLoc The template argument to expand.
8916  ///
8917  /// \param Ellipsis Will be set to the location of the ellipsis.
8918  ///
8919  /// \param NumExpansions Will be set to the number of expansions that will
8920  /// be generated from this pack expansion, if known a priori.
8922  TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis,
8923  std::optional<unsigned> &NumExpansions) const;
8924 
8925  /// Given a template argument that contains an unexpanded parameter pack, but
8926  /// which has already been substituted, attempt to determine the number of
8927  /// elements that will be produced once this argument is fully-expanded.
8928  ///
8929  /// This is intended for use when transforming 'sizeof...(Arg)' in order to
8930  /// avoid actually expanding the pack where possible.
8931  std::optional<unsigned> getFullyPackExpandedSize(TemplateArgument Arg);
8932 
8933  //===--------------------------------------------------------------------===//
8934  // C++ Template Argument Deduction (C++ [temp.deduct])
8935  //===--------------------------------------------------------------------===//
8936 
8937  /// Adjust the type \p ArgFunctionType to match the calling convention,
8938  /// noreturn, and optionally the exception specification of \p FunctionType.
8939  /// Deduction often wants to ignore these properties when matching function
8940  /// types.
8942  bool AdjustExceptionSpec = false);
8943 
8944  /// Describes the result of template argument deduction.
8945  ///
8946  /// The TemplateDeductionResult enumeration describes the result of
8947  /// template argument deduction, as returned from
8948  /// DeduceTemplateArguments(). The separate TemplateDeductionInfo
8949  /// structure provides additional information about the results of
8950  /// template argument deduction, e.g., the deduced template argument
8951  /// list (if successful) or the specific template parameters or
8952  /// deduced arguments that were involved in the failure.
8954  /// Template argument deduction was successful.
8956  /// The declaration was invalid; do nothing.
8958  /// Template argument deduction exceeded the maximum template
8959  /// instantiation depth (which has already been diagnosed).
8961  /// Template argument deduction did not deduce a value
8962  /// for every template parameter.
8964  /// Template argument deduction did not deduce a value for every
8965  /// expansion of an expanded template parameter pack.
8967  /// Template argument deduction produced inconsistent
8968  /// deduced values for the given template parameter.
8970  /// Template argument deduction failed due to inconsistent
8971  /// cv-qualifiers on a template parameter type that would
8972  /// otherwise be deduced, e.g., we tried to deduce T in "const T"
8973  /// but were given a non-const "X".
8975  /// Substitution of the deduced template argument values
8976  /// resulted in an error.
8978  /// After substituting deduced template arguments, a dependent
8979  /// parameter type did not match the corresponding argument.
8981  /// After substituting deduced template arguments, an element of
8982  /// a dependent parameter type did not match the corresponding element
8983  /// of the corresponding argument (when deducing from an initializer list).
8985  /// A non-depnedent component of the parameter did not match the
8986  /// corresponding component of the argument.
8988  /// When performing template argument deduction for a function
8989  /// template, there were too many call arguments.
8991  /// When performing template argument deduction for a function
8992  /// template, there were too few call arguments.
8994  /// The explicitly-specified template arguments were not valid
8995  /// template arguments for the given template.
8997  /// Checking non-dependent argument conversions failed.
8999  /// The deduced arguments did not satisfy the constraints associated
9000  /// with the template.
9002  /// Deduction failed; that's all we know.
9004  /// CUDA Target attributes do not match.
9006  /// Some error which was already diagnosed.
9008  };
9009 
9012  const TemplateArgumentList &TemplateArgs,
9014 
9017  const TemplateArgumentList &TemplateArgs,
9019 
9021  FunctionTemplateDecl *FunctionTemplate,
9022  TemplateArgumentListInfo &ExplicitTemplateArgs,
9026 
9027  /// brief A function argument from which we performed template argument
9028  // deduction for a call.
9031  unsigned ArgIdx, QualType OriginalArgType)
9035 
9038  unsigned ArgIdx;
9040  };
9041 
9043  FunctionTemplateDecl *FunctionTemplate,
9045  unsigned NumExplicitlySpecified, FunctionDecl *&Specialization,
9047  SmallVectorImpl<OriginalCallArg> const *OriginalCallArgs = nullptr,
9048  bool PartialOverloading = false,
9049  llvm::function_ref<bool()> CheckNonDependent = []{ return false; });
9050 
9052  FunctionTemplateDecl *FunctionTemplate,
9053  TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args,
9054  FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info,
9055  bool PartialOverloading,
9056  llvm::function_ref<bool(ArrayRef<QualType>)> CheckNonDependent);
9057 
9060  TemplateArgumentListInfo *ExplicitTemplateArgs,
9061  QualType ArgFunctionType,
9062  FunctionDecl *&Specialization,
9064  bool IsAddressOfFunction = false);
9065 
9068  QualType ToType,
9069  CXXConversionDecl *&Specialization,
9071 
9074  TemplateArgumentListInfo *ExplicitTemplateArgs,
9075  FunctionDecl *&Specialization,
9077  bool IsAddressOfFunction = false);
9078 
9079  /// Substitute Replacement for \p auto in \p TypeWithAuto
9080  QualType SubstAutoType(QualType TypeWithAuto, QualType Replacement);
9081  /// Substitute Replacement for auto in TypeWithAuto
9083  QualType Replacement);
9084 
9085  // Substitute auto in TypeWithAuto for a Dependent auto type
9087 
9088  // Substitute auto in TypeWithAuto for a Dependent auto type
9089  TypeSourceInfo *
9091 
9092  /// Completely replace the \c auto in \p TypeWithAuto by
9093  /// \p Replacement. This does not retain any \c auto type sugar.
9094  QualType ReplaceAutoType(QualType TypeWithAuto, QualType Replacement);
9096  QualType Replacement);
9097 
9099  QualType &Result,
9101  bool DependentDeduction = false,
9102  bool IgnoreConstraints = false);
9103  void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init);
9105  bool Diagnose = true);
9106 
9107  /// Declare implicit deduction guides for a class template if we've
9108  /// not already done so.
9110  SourceLocation Loc);
9111 
9113  TypeSourceInfo *TInfo, const InitializedEntity &Entity,
9114  const InitializationKind &Kind, MultiExprArg Init);
9115 
9118  SourceRange Range, bool DirectInit,
9119  Expr *Init);
9120 
9122 
9124  SourceLocation ReturnLoc, Expr *RetExpr,
9125  const AutoType *AT);
9126 
9129  TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1,
9130  unsigned NumCallArguments2, bool Reversed = false);
9133  TemplateSpecCandidateSet &FailedCandidates,
9134  SourceLocation Loc,
9135  const PartialDiagnostic &NoneDiag,
9136  const PartialDiagnostic &AmbigDiag,
9137  const PartialDiagnostic &CandidateDiag,
9138  bool Complain = true, QualType TargetType = QualType());
9139 
9144  SourceLocation Loc);
9145 
9148 
9152 
9155 
9157  TemplateParameterList *PParam, TemplateDecl *AArg, SourceLocation Loc);
9158 
9159  void MarkUsedTemplateParameters(const Expr *E, bool OnlyDeduced,
9160  unsigned Depth, llvm::SmallBitVector &Used);
9161 
9162  void MarkUsedTemplateParameters(const TemplateArgumentList &TemplateArgs,
9163  bool OnlyDeduced,
9164  unsigned Depth,
9165  llvm::SmallBitVector &Used);
9167  const FunctionTemplateDecl *FunctionTemplate,
9168  llvm::SmallBitVector &Deduced) {
9169  return MarkDeducedTemplateParameters(Context, FunctionTemplate, Deduced);
9170  }
9171  static void MarkDeducedTemplateParameters(ASTContext &Ctx,
9172  const FunctionTemplateDecl *FunctionTemplate,
9173  llvm::SmallBitVector &Deduced);
9174 
9175  //===--------------------------------------------------------------------===//
9176  // C++ Template Instantiation
9177  //
9178 
9180  getTemplateInstantiationArgs(const NamedDecl *D, bool Final = false,
9181  const TemplateArgumentList *Innermost = nullptr,
9182  bool RelativeToPrimary = false,
9183  const FunctionDecl *Pattern = nullptr,
9184  bool ForConstraintInstantiation = false,
9185  bool SkipForSpecialization = false);
9186 
9187  /// A context in which code is being synthesized (where a source location
9188  /// alone is not sufficient to identify the context). This covers template
9189  /// instantiation and various forms of implicitly-generated functions.
9191  /// The kind of template instantiation we are performing
9193  /// We are instantiating a template declaration. The entity is
9194  /// the declaration we're instantiating (e.g., a CXXRecordDecl).
9196 
9197  /// We are instantiating a default argument for a template
9198  /// parameter. The Entity is the template parameter whose argument is
9199  /// being instantiated, the Template is the template, and the
9200  /// TemplateArgs/NumTemplateArguments provide the template arguments as
9201  /// specified.
9203 
9204  /// We are instantiating a default argument for a function.
9205  /// The Entity is the ParmVarDecl, and TemplateArgs/NumTemplateArgs
9206  /// provides the template arguments as specified.
9208 
9209  /// We are substituting explicit template arguments provided for
9210  /// a function template. The entity is a FunctionTemplateDecl.
9212 
9213  /// We are substituting template argument determined as part of
9214  /// template argument deduction for either a class template
9215  /// partial specialization or a function template. The
9216  /// Entity is either a {Class|Var}TemplatePartialSpecializationDecl or
9217  /// a TemplateDecl.
9219 
9220  /// We are substituting prior template arguments into a new
9221  /// template parameter. The template parameter itself is either a
9222  /// NonTypeTemplateParmDecl or a TemplateTemplateParmDecl.
9224 
9225  /// We are checking the validity of a default template argument that
9226  /// has been used when naming a template-id.
9228 
9229  /// We are computing the exception specification for a defaulted special
9230  /// member function.
9232 
9233  /// We are instantiating the exception specification for a function
9234  /// template which was deferred until it was needed.
9236 
9237  /// We are instantiating a requirement of a requires expression.
9239 
9240  /// We are checking the satisfaction of a nested requirement of a requires
9241  /// expression.
9243 
9244  /// We are declaring an implicit special member function.
9246 
9247  /// We are declaring an implicit 'operator==' for a defaulted
9248  /// 'operator<=>'.
9250 
9251  /// We are defining a synthesized function (such as a defaulted special
9252  /// member).
9254 
9255  // We are checking the constraints associated with a constrained entity or
9256  // the constraint expression of a concept. This includes the checks that
9257  // atomic constraints have the type 'bool' and that they can be constant
9258  // evaluated.
9260 
9261  // We are substituting template arguments into a constraint expression.
9263 
9264  // We are normalizing a constraint expression.
9266 
9267  // Instantiating a Requires Expression parameter clause.
9269 
9270  // We are substituting into the parameter mapping of an atomic constraint
9271  // during normalization.
9273 
9274  /// We are rewriting a comparison operator in terms of an operator<=>.
9276 
9277  /// We are initializing a structured binding.
9279 
9280  /// We are marking a class as __dllexport.
9282 
9283  /// We are building an implied call from __builtin_dump_struct. The
9284  /// arguments are in CallArgs.
9286 
9287  /// Added for Template instantiation observation.
9288  /// Memoization means we are _not_ instantiating a template because
9289  /// it is already instantiated (but we entered a context where we
9290  /// would have had to if it was not already instantiated).
9292  } Kind;
9293 
9294  /// Was the enclosing context a non-instantiation SFINAE context?
9296 
9297  /// The point of instantiation or synthesis within the source code.
9299 
9300  /// The entity that is being synthesized.
9302 
9303  /// The template (or partial specialization) in which we are
9304  /// performing the instantiation, for substitutions of prior template
9305  /// arguments.
9307 
9308  union {
9309  /// The list of template arguments we are substituting, if they
9310  /// are not part of the entity.
9312 
9313  /// The list of argument expressions in a synthesized call.
9314  const Expr *const *CallArgs;
9315  };
9316 
9317  // FIXME: Wrap this union around more members, or perhaps store the
9318  // kind-specific members in the RAII object owning the context.
9319  union {
9320  /// The number of template arguments in TemplateArgs.
9322 
9323  /// The number of expressions in CallArgs.
9324  unsigned NumCallArgs;
9325 
9326  /// The special member being declared or defined.
9328  };
9329 
9331  assert(Kind != DeclaringSpecialMember);
9332  return {TemplateArgs, NumTemplateArgs};
9333  }
9334 
9335  /// The template deduction info object associated with the
9336  /// substitution or checking of explicit or deduced template arguments.
9338 
9339  /// The source range that covers the construct that cause
9340  /// the instantiation, e.g., the template-id that causes a class
9341  /// template instantiation.
9343 
9347  Template(nullptr), TemplateArgs(nullptr), NumTemplateArgs(0),
9348  DeductionInfo(nullptr) {}
9349 
9350  /// Determines whether this template is an actual instantiation
9351  /// that should be counted toward the maximum instantiation depth.
9352  bool isInstantiationRecord() const;
9353  };
9354 
9355  /// List of active code synthesis contexts.
9356  ///
9357  /// This vector is treated as a stack. As synthesis of one entity requires
9358  /// synthesis of another, additional contexts are pushed onto the stack.
9360 
9361  /// Specializations whose definitions are currently being instantiated.
9363 
9364  /// Non-dependent types used in templates that have already been instantiated
9365  /// by some template instantiation.
9367 
9368  /// Extra modules inspected when performing a lookup during a template
9369  /// instantiation. Computed lazily.
9371 
9372  /// Cache of additional modules that should be used for name lookup
9373  /// within the current template instantiation. Computed lazily; use
9374  /// getLookupModules() to get a complete set.
9376 
9377  /// Get the set of additional modules that should be checked during
9378  /// name lookup. A module and its imports become visible when instanting a
9379  /// template defined within it.
9381 
9382  /// Map from the most recent declaration of a namespace to the most
9383  /// recent visible declaration of that namespace.
9384  llvm::DenseMap<NamedDecl*, NamedDecl*> VisibleNamespaceCache;
9385 
9386  /// Whether we are in a SFINAE context that is not associated with
9387  /// template instantiation.
9388  ///
9389  /// This is used when setting up a SFINAE trap (\c see SFINAETrap) outside
9390  /// of a template instantiation or template argument deduction.
9392 
9393  /// The number of \p CodeSynthesisContexts that are not template
9394  /// instantiations and, therefore, should not be counted as part of the
9395  /// instantiation depth.
9396  ///
9397  /// When the instantiation depth reaches the user-configurable limit
9398  /// \p LangOptions::InstantiationDepth we will abort instantiation.
9399  // FIXME: Should we have a similar limit for other forms of synthesis?
9401 
9402  /// The depth of the context stack at the point when the most recent
9403  /// error or warning was produced.
9404  ///
9405  /// This value is used to suppress printing of redundant context stacks
9406  /// when there are multiple errors or warnings in the same instantiation.
9407  // FIXME: Does this belong in Sema? It's tough to implement it anywhere else.
9409 
9410  /// The template instantiation callbacks to trace or track
9411  /// instantiations (objects can be chained).
9412  ///
9413  /// This callbacks is used to print, trace or track template
9414  /// instantiations as they are being constructed.
9415  std::vector<std::unique_ptr<TemplateInstantiationCallback>>
9417 
9418  /// The current index into pack expansion arguments that will be
9419  /// used for substitution of parameter packs.
9420  ///
9421  /// The pack expansion index will be -1 to indicate that parameter packs
9422  /// should be instantiated as themselves. Otherwise, the index specifies
9423  /// which argument within the parameter pack will be used for substitution.
9425 
9426  /// RAII object used to change the argument pack substitution index
9427  /// within a \c Sema object.
9428  ///
9429  /// See \c ArgumentPackSubstitutionIndex for more information.
9431  Sema &Self;
9432  int OldSubstitutionIndex;
9433 
9434  public:
9435  ArgumentPackSubstitutionIndexRAII(Sema &Self, int NewSubstitutionIndex)
9436  : Self(Self), OldSubstitutionIndex(Self.ArgumentPackSubstitutionIndex) {
9437  Self.ArgumentPackSubstitutionIndex = NewSubstitutionIndex;
9438  }
9439 
9441  Self.ArgumentPackSubstitutionIndex = OldSubstitutionIndex;
9442  }
9443  };
9444 
9446 
9447  /// For each declaration that involved template argument deduction, the
9448  /// set of diagnostics that were suppressed during that template argument
9449  /// deduction.
9450  ///
9451  /// FIXME: Serialize this structure to the AST file.
9452  typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> >
9455 
9456  /// A stack object to be created when performing template
9457  /// instantiation.
9458  ///
9459  /// Construction of an object of type \c InstantiatingTemplate
9460  /// pushes the current instantiation onto the stack of active
9461  /// instantiations. If the size of this stack exceeds the maximum
9462  /// number of recursive template instantiations, construction
9463  /// produces an error and evaluates true.
9464  ///
9465  /// Destruction of this object will pop the named instantiation off
9466  /// the stack.
9468  /// Note that we are instantiating a class template,
9469  /// function template, variable template, alias template,
9470  /// or a member thereof.
9471  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9472  Decl *Entity,
9473  SourceRange InstantiationRange = SourceRange());
9474 
9476  /// Note that we are instantiating an exception specification
9477  /// of a function template.
9478  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9480  SourceRange InstantiationRange = SourceRange());
9481 
9482  /// Note that we are instantiating a default argument in a
9483  /// template-id.
9484  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9485  TemplateParameter Param, TemplateDecl *Template,
9486  ArrayRef<TemplateArgument> TemplateArgs,
9487  SourceRange InstantiationRange = SourceRange());
9488 
9489  /// Note that we are substituting either explicitly-specified or
9490  /// deduced template arguments during function template argument deduction.
9491  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9492  FunctionTemplateDecl *FunctionTemplate,
9493  ArrayRef<TemplateArgument> TemplateArgs,
9495  sema::TemplateDeductionInfo &DeductionInfo,
9496  SourceRange InstantiationRange = SourceRange());
9497 
9498  /// Note that we are instantiating as part of template
9499  /// argument deduction for a class template declaration.
9500  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9501  TemplateDecl *Template,
9502  ArrayRef<TemplateArgument> TemplateArgs,
9503  sema::TemplateDeductionInfo &DeductionInfo,
9504  SourceRange InstantiationRange = SourceRange());
9505 
9506  /// Note that we are instantiating as part of template
9507  /// argument deduction for a class template partial
9508  /// specialization.
9509  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9511  ArrayRef<TemplateArgument> TemplateArgs,
9512  sema::TemplateDeductionInfo &DeductionInfo,
9513  SourceRange InstantiationRange = SourceRange());
9514 
9515  /// Note that we are instantiating as part of template
9516  /// argument deduction for a variable template partial
9517  /// specialization.
9518  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9520  ArrayRef<TemplateArgument> TemplateArgs,
9521  sema::TemplateDeductionInfo &DeductionInfo,
9522  SourceRange InstantiationRange = SourceRange());
9523 
9524  /// Note that we are instantiating a default argument for a function
9525  /// parameter.
9526  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9527  ParmVarDecl *Param,
9528  ArrayRef<TemplateArgument> TemplateArgs,
9529  SourceRange InstantiationRange = SourceRange());
9530 
9531  /// Note that we are substituting prior template arguments into a
9532  /// non-type parameter.
9533  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9534  NamedDecl *Template,
9535  NonTypeTemplateParmDecl *Param,
9536  ArrayRef<TemplateArgument> TemplateArgs,
9537  SourceRange InstantiationRange);
9538 
9539  /// Note that we are substituting prior template arguments into a
9540  /// template template parameter.
9541  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9542  NamedDecl *Template,
9543  TemplateTemplateParmDecl *Param,
9544  ArrayRef<TemplateArgument> TemplateArgs,
9545  SourceRange InstantiationRange);
9546 
9547  /// Note that we are checking the default template argument
9548  /// against the template parameter for a given template-id.
9549  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9550  TemplateDecl *Template,
9551  NamedDecl *Param,
9552  ArrayRef<TemplateArgument> TemplateArgs,
9553  SourceRange InstantiationRange);
9554 
9555  struct ConstraintsCheck {};
9556  /// \brief Note that we are checking the constraints associated with some
9557  /// constrained entity (a concept declaration or a template with associated
9558  /// constraints).
9559  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9560  ConstraintsCheck, NamedDecl *Template,
9561  ArrayRef<TemplateArgument> TemplateArgs,
9562  SourceRange InstantiationRange);
9563 
9565  /// \brief Note that we are checking a constraint expression associated
9566  /// with a template declaration or as part of the satisfaction check of a
9567  /// concept.
9568  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9569  ConstraintSubstitution, NamedDecl *Template,
9570  sema::TemplateDeductionInfo &DeductionInfo,
9571  SourceRange InstantiationRange);
9572 
9574  /// \brief Note that we are normalizing a constraint expression.
9575  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9577  SourceRange InstantiationRange);
9578 
9580  /// \brief Note that we are subtituting into the parameter mapping of an
9581  /// atomic constraint during constraint normalization.
9582  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9584  SourceRange InstantiationRange);
9585 
9586  /// \brief Note that we are substituting template arguments into a part of
9587  /// a requirement of a requires expression.
9588  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9589  concepts::Requirement *Req,
9590  sema::TemplateDeductionInfo &DeductionInfo,
9591  SourceRange InstantiationRange = SourceRange());
9592 
9593  /// \brief Note that we are checking the satisfaction of the constraint
9594  /// expression inside of a nested requirement.
9595  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9597  SourceRange InstantiationRange = SourceRange());
9598 
9599  /// \brief Note that we are checking a requires clause.
9600  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9601  const RequiresExpr *E,
9602  sema::TemplateDeductionInfo &DeductionInfo,
9603  SourceRange InstantiationRange);
9604  /// Note that we have finished instantiating this template.
9605  void Clear();
9606 
9608 
9609  /// Determines whether we have exceeded the maximum
9610  /// recursive template instantiations.
9611  bool isInvalid() const { return Invalid; }
9612 
9613  /// Determine whether we are already instantiating this
9614  /// specialization in some surrounding active instantiation.
9615  bool isAlreadyInstantiating() const { return AlreadyInstantiating; }
9616 
9617  private:
9618  Sema &SemaRef;
9619  bool Invalid;
9620  bool AlreadyInstantiating;
9621  bool CheckInstantiationDepth(SourceLocation PointOfInstantiation,
9622  SourceRange InstantiationRange);
9623 
9626  SourceLocation PointOfInstantiation, SourceRange InstantiationRange,
9627  Decl *Entity, NamedDecl *Template = nullptr,
9628  ArrayRef<TemplateArgument> TemplateArgs = std::nullopt,
9629  sema::TemplateDeductionInfo *DeductionInfo = nullptr);
9630 
9632 
9634  operator=(const InstantiatingTemplate&) = delete;
9635  };
9636 
9637  void pushCodeSynthesisContext(CodeSynthesisContext Ctx);
9638  void popCodeSynthesisContext();
9639 
9640  /// Determine whether we are currently performing template instantiation.
9643  }
9644 
9646  if (!CodeSynthesisContexts.empty() &&
9650  }
9653  }
9654  void PrintInstantiationStack();
9655 
9657 
9658  /// Determines whether we are currently in a context where
9659  /// template argument substitution failures are not considered
9660  /// errors.
9661  ///
9662  /// \returns An empty \c Optional if we're not in a SFINAE context.
9663  /// Otherwise, contains a pointer that, if non-NULL, contains the nearest
9664  /// template-deduction context object, which can be used to capture
9665  /// diagnostics that will be suppressed.
9666  std::optional<sema::TemplateDeductionInfo *> isSFINAEContext() const;
9667 
9668  /// Determines whether we are currently in a context that
9669  /// is not evaluated as per C++ [expr] p5.
9670  bool isUnevaluatedContext() const {
9671  assert(!ExprEvalContexts.empty() &&
9672  "Must be in an expression evaluation context");
9673  return ExprEvalContexts.back().isUnevaluated();
9674  }
9675 
9677  assert(!ExprEvalContexts.empty() &&
9678  "Must be in an expression evaluation context");
9679  return ExprEvalContexts.back().isConstantEvaluated();
9680  }
9681 
9683  assert(!ExprEvalContexts.empty() &&
9684  "Must be in an expression evaluation context");
9685  return ExprEvalContexts.back().isImmediateFunctionContext();
9686  }
9687 
9689  assert(!ExprEvalContexts.empty() &&
9690  "Must be in an expression evaluation context");
9692  return (Ctx.Context ==
9695  }
9696 
9697  std::optional<ExpressionEvaluationContextRecord::InitializationContext>
9699  assert(!ExprEvalContexts.empty() &&
9700  "Must be in an expression evaluation context");
9701  for (const auto &Ctx : llvm::reverse(ExprEvalContexts)) {
9703  Ctx.DelayedDefaultInitializationContext)
9704  return Ctx.DelayedDefaultInitializationContext;
9705  if (Ctx.isConstantEvaluated() || Ctx.isImmediateFunctionContext() ||
9706  Ctx.isUnevaluated())
9707  break;
9708  }
9709  return std::nullopt;
9710  }
9711 
9712  std::optional<ExpressionEvaluationContextRecord::InitializationContext>
9714  assert(!ExprEvalContexts.empty() &&
9715  "Must be in an expression evaluation context");
9716  std::optional<ExpressionEvaluationContextRecord::InitializationContext> Res;
9717  for (auto &Ctx : llvm::reverse(ExprEvalContexts)) {
9719  !Ctx.DelayedDefaultInitializationContext && Res)
9720  break;
9721  if (Ctx.isConstantEvaluated() || Ctx.isImmediateFunctionContext() ||
9722  Ctx.isUnevaluated())
9723  break;
9724  Res = Ctx.DelayedDefaultInitializationContext;
9725  }
9726  return Res;
9727  }
9728 
9729  /// RAII class used to determine whether SFINAE has
9730  /// trapped any errors that occur during template argument
9731  /// deduction.
9732  class SFINAETrap {
9733  Sema &SemaRef;
9734  unsigned PrevSFINAEErrors;
9735  bool PrevInNonInstantiationSFINAEContext;
9736  bool PrevAccessCheckingSFINAE;
9737  bool PrevLastDiagnosticIgnored;
9738 
9739  public:
9740  explicit SFINAETrap(Sema &SemaRef, bool AccessCheckingSFINAE = false)
9741  : SemaRef(SemaRef), PrevSFINAEErrors(SemaRef.NumSFINAEErrors),
9742  PrevInNonInstantiationSFINAEContext(
9744  PrevAccessCheckingSFINAE(SemaRef.AccessCheckingSFINAE),
9745  PrevLastDiagnosticIgnored(
9746  SemaRef.getDiagnostics().isLastDiagnosticIgnored())
9747  {
9748  if (!SemaRef.isSFINAEContext())
9749  SemaRef.InNonInstantiationSFINAEContext = true;
9751  }
9752 
9754  SemaRef.NumSFINAEErrors = PrevSFINAEErrors;
9756  = PrevInNonInstantiationSFINAEContext;
9757  SemaRef.AccessCheckingSFINAE = PrevAccessCheckingSFINAE;
9759  PrevLastDiagnosticIgnored);
9760  }
9761 
9762  /// Determine whether any SFINAE errors have been trapped.
9763  bool hasErrorOccurred() const {
9764  return SemaRef.NumSFINAEErrors > PrevSFINAEErrors;
9765  }
9766  };
9767 
9768  /// RAII class used to indicate that we are performing provisional
9769  /// semantic analysis to determine the validity of a construct, so
9770  /// typo-correction and diagnostics in the immediate context (not within
9771  /// implicitly-instantiated templates) should be suppressed.
9773  Sema &SemaRef;
9774  // FIXME: Using a SFINAETrap for this is a hack.
9775  SFINAETrap Trap;
9776  bool PrevDisableTypoCorrection;
9777  public:
9778  explicit TentativeAnalysisScope(Sema &SemaRef)
9779  : SemaRef(SemaRef), Trap(SemaRef, true),
9780  PrevDisableTypoCorrection(SemaRef.DisableTypoCorrection) {
9781  SemaRef.DisableTypoCorrection = true;
9782  }
9784  SemaRef.DisableTypoCorrection = PrevDisableTypoCorrection;
9785  }
9786  };
9787 
9788  /// The current instantiation scope used to store local
9789  /// variables.
9791 
9792  /// Tracks whether we are in a context where typo correction is
9793  /// disabled.
9795 
9796  /// The number of typos corrected by CorrectTypo.
9797  unsigned TyposCorrected;
9798 
9799  typedef llvm::SmallSet<SourceLocation, 2> SrcLocSet;
9800  typedef llvm::DenseMap<IdentifierInfo *, SrcLocSet> IdentifierSourceLocations;
9801 
9802  /// A cache containing identifiers for which typo correction failed and
9803  /// their locations, so that repeated attempts to correct an identifier in a
9804  /// given location are ignored if typo correction already failed for it.
9806 
9807  /// Worker object for performing CFG-based warnings.
9810 
9811  /// An entity for which implicit template instantiation is required.
9812  ///
9813  /// The source location associated with the declaration is the first place in
9814  /// the source code where the declaration was "used". It is not necessarily
9815  /// the point of instantiation (which will be either before or after the
9816  /// namespace-scope declaration that triggered this implicit instantiation),
9817  /// However, it is the location that diagnostics should generally refer to,
9818  /// because users will need to know what code triggered the instantiation.
9819  typedef std::pair<ValueDecl *, SourceLocation> PendingImplicitInstantiation;
9820 
9821  /// The queue of implicit template instantiations that are required
9822  /// but have not yet been performed.
9823  std::deque<PendingImplicitInstantiation> PendingInstantiations;
9824 
9825  /// Queue of implicit template instantiations that cannot be performed
9826  /// eagerly.
9828 
9830  public:
9832  : S(S), Enabled(Enabled) {
9833  if (!Enabled) return;
9834 
9835  SavedPendingInstantiations.swap(S.PendingInstantiations);
9836  SavedVTableUses.swap(S.VTableUses);
9837  }
9838 
9839  void perform() {
9840  if (Enabled) {
9841  S.DefineUsedVTables();
9842  S.PerformPendingInstantiations();
9843  }
9844  }
9845 
9847  if (!Enabled) return;
9848 
9849  // Restore the set of pending vtables.
9850  assert(S.VTableUses.empty() &&
9851  "VTableUses should be empty before it is discarded.");
9852  S.VTableUses.swap(SavedVTableUses);
9853 
9854  // Restore the set of pending implicit instantiations.
9855  if (S.TUKind != TU_Prefix || !S.LangOpts.PCHInstantiateTemplates) {
9856  assert(S.PendingInstantiations.empty() &&
9857  "PendingInstantiations should be empty before it is discarded.");
9858  S.PendingInstantiations.swap(SavedPendingInstantiations);
9859  } else {
9860  // Template instantiations in the PCH may be delayed until the TU.
9861  S.PendingInstantiations.swap(SavedPendingInstantiations);
9862  S.PendingInstantiations.insert(S.PendingInstantiations.end(),
9863  SavedPendingInstantiations.begin(),
9864  SavedPendingInstantiations.end());
9865  }
9866  }
9867 
9868  private:
9869  Sema &S;
9870  SmallVector<VTableUse, 16> SavedVTableUses;
9871  std::deque<PendingImplicitInstantiation> SavedPendingInstantiations;
9872  bool Enabled;
9873  };
9874 
9875  /// The queue of implicit template instantiations that are required
9876  /// and must be performed within the current local scope.
9877  ///
9878  /// This queue is only used for member functions of local classes in
9879  /// templates, which must be instantiated in the same scope as their
9880  /// enclosing function, so that they can reference function-local
9881  /// types, static variables, enumerators, etc.
9882  std::deque<PendingImplicitInstantiation> PendingLocalImplicitInstantiations;
9883 
9885  public:
9887  SavedPendingLocalImplicitInstantiations.swap(
9888  S.PendingLocalImplicitInstantiations);
9889  }
9890 
9891  void perform() { S.PerformPendingInstantiations(/*LocalOnly=*/true); }
9892 
9894  assert(S.PendingLocalImplicitInstantiations.empty() &&
9895  "there shouldn't be any pending local implicit instantiations");
9896  SavedPendingLocalImplicitInstantiations.swap(
9897  S.PendingLocalImplicitInstantiations);
9898  }
9899 
9900  private:
9901  Sema &S;
9902  std::deque<PendingImplicitInstantiation>
9903  SavedPendingLocalImplicitInstantiations;
9904  };
9905 
9906  /// A helper class for building up ExtParameterInfos.
9909  bool HasInteresting = false;
9910 
9911  public:
9912  /// Set the ExtParameterInfo for the parameter at the given index,
9913  ///
9914  void set(unsigned index, FunctionProtoType::ExtParameterInfo info) {
9915  assert(Infos.size() <= index);
9916  Infos.resize(index);
9917  Infos.push_back(info);
9918 
9919  if (!HasInteresting)
9920  HasInteresting = (info != FunctionProtoType::ExtParameterInfo());
9921  }
9922 
9923  /// Return a pointer (suitable for setting in an ExtProtoInfo) to the
9924  /// ExtParameterInfo array we've built up.
9926  getPointerOrNull(unsigned numParams) {
9927  if (!HasInteresting) return nullptr;
9928  Infos.resize(numParams);
9929  return Infos.data();
9930  }
9931  };
9932 
9933  void PerformPendingInstantiations(bool LocalOnly = false);
9934 
9936  const MultiLevelTemplateArgumentList &TemplateArgs,
9937  SourceLocation Loc, DeclarationName Entity,
9938  bool AllowDeducedTST = false);
9939 
9941  const MultiLevelTemplateArgumentList &TemplateArgs,
9942  SourceLocation Loc, DeclarationName Entity);
9943 
9945  const MultiLevelTemplateArgumentList &TemplateArgs,
9946  SourceLocation Loc, DeclarationName Entity);
9947 
9949  TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs,
9950  SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext,
9951  Qualifiers ThisTypeQuals, bool EvaluateConstraints = true);
9952  void SubstExceptionSpec(FunctionDecl *New, const FunctionProtoType *Proto,
9953  const MultiLevelTemplateArgumentList &Args);
9956  SmallVectorImpl<QualType> &ExceptionStorage,
9957  const MultiLevelTemplateArgumentList &Args);
9958  ParmVarDecl *
9960  const MultiLevelTemplateArgumentList &TemplateArgs,
9961  int indexAdjustment, std::optional<unsigned> NumExpansions,
9962  bool ExpectParameterPack, bool EvaluateConstraints = true);
9964  const FunctionProtoType::ExtParameterInfo *ExtParamInfos,
9965  const MultiLevelTemplateArgumentList &TemplateArgs,
9966  SmallVectorImpl<QualType> &ParamTypes,
9967  SmallVectorImpl<ParmVarDecl *> *OutParams,
9968  ExtParameterInfoBuilder &ParamInfos);
9970  const MultiLevelTemplateArgumentList &TemplateArgs,
9971  bool ForCallExpr = false);
9973  const MultiLevelTemplateArgumentList &TemplateArgs);
9974 
9975  // A RAII type used by the TemplateDeclInstantiator and TemplateInstantiator
9976  // to disable constraint evaluation, then restore the state.
9977  template <typename InstTy> struct ConstraintEvalRAII {
9978  InstTy &TI;
9979  bool OldValue;
9980 
9982  : TI(TI), OldValue(TI.getEvaluateConstraints()) {
9983  TI.setEvaluateConstraints(false);
9984  }
9985  ~ConstraintEvalRAII() { TI.setEvaluateConstraints(OldValue); }
9986  };
9987 
9988  // Unlike the above, this evaluates constraints, which should only happen at
9989  // 'constraint checking' time.
9990  ExprResult
9992  const MultiLevelTemplateArgumentList &TemplateArgs);
9993 
9994  /// Substitute the given template arguments into a list of
9995  /// expressions, expanding pack expansions if required.
9996  ///
9997  /// \param Exprs The list of expressions to substitute into.
9998  ///
9999  /// \param IsCall Whether this is some form of call, in which case
10000  /// default arguments will be dropped.
10001  ///
10002  /// \param TemplateArgs The set of template arguments to substitute.
10003  ///
10004  /// \param Outputs Will receive all of the substituted arguments.
10005  ///
10006  /// \returns true if an error occurred, false otherwise.
10007  bool SubstExprs(ArrayRef<Expr *> Exprs, bool IsCall,
10008  const MultiLevelTemplateArgumentList &TemplateArgs,
10009  SmallVectorImpl<Expr *> &Outputs);
10010 
10012  const MultiLevelTemplateArgumentList &TemplateArgs);
10013 
10016  const MultiLevelTemplateArgumentList &TemplateArgs,
10017  bool EvaluateConstraints = true);
10018 
10019  bool
10021  const MultiLevelTemplateArgumentList &TemplateArgs,
10022  TemplateArgumentListInfo &Outputs);
10023 
10024  Decl *SubstDecl(Decl *D, DeclContext *Owner,
10025  const MultiLevelTemplateArgumentList &TemplateArgs);
10026 
10027  /// Substitute the name and return type of a defaulted 'operator<=>' to form
10028  /// an implicit 'operator=='.
10031 
10033  const MultiLevelTemplateArgumentList &TemplateArgs,
10034  bool CXXDirectInit);
10035 
10036  bool
10037  SubstBaseSpecifiers(CXXRecordDecl *Instantiation,
10038  CXXRecordDecl *Pattern,
10039  const MultiLevelTemplateArgumentList &TemplateArgs);
10040 
10041  bool
10042  InstantiateClass(SourceLocation PointOfInstantiation,
10043  CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern,
10044  const MultiLevelTemplateArgumentList &TemplateArgs,
10046  bool Complain = true);
10047 
10048  bool InstantiateEnum(SourceLocation PointOfInstantiation,
10049  EnumDecl *Instantiation, EnumDecl *Pattern,
10050  const MultiLevelTemplateArgumentList &TemplateArgs,
10052 
10054  SourceLocation PointOfInstantiation, FieldDecl *Instantiation,
10055  FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs);
10056 
10058  const Attr *TmplAttr;
10061 
10063  Decl *D)
10064  : TmplAttr(A), Scope(S), NewDecl(D)
10065  { }
10066  };
10068 
10069  void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs,
10070  const Decl *Pattern, Decl *Inst,
10071  LateInstantiatedAttrVec *LateAttrs = nullptr,
10072  LocalInstantiationScope *OuterMostScope = nullptr);
10073 
10074  void
10076  const Decl *Pattern, Decl *Inst,
10077  LateInstantiatedAttrVec *LateAttrs = nullptr,
10078  LocalInstantiationScope *OuterMostScope = nullptr);
10079 
10081 
10083  SourceLocation Loc, ClassTemplateSpecializationDecl *ClassTemplateSpec);
10084 
10085  bool
10087  ClassTemplateSpecializationDecl *ClassTemplateSpec,
10089  bool Complain = true);
10090 
10091  void InstantiateClassMembers(SourceLocation PointOfInstantiation,
10092  CXXRecordDecl *Instantiation,
10093  const MultiLevelTemplateArgumentList &TemplateArgs,
10095 
10097  SourceLocation PointOfInstantiation,
10098  ClassTemplateSpecializationDecl *ClassTemplateSpec,
10100 
10103  const MultiLevelTemplateArgumentList &TemplateArgs);
10104 
10107  const MultiLevelTemplateArgumentList &TemplateArgs);
10108  TemplateName
10110  SourceLocation Loc,
10111  const MultiLevelTemplateArgumentList &TemplateArgs);
10112 
10114  const MultiLevelTemplateArgumentList &TemplateArgs,
10115  bool EvaluateConstraint);
10116 
10118  ParmVarDecl *Param);
10119  void InstantiateExceptionSpec(SourceLocation PointOfInstantiation,
10120  FunctionDecl *Function);
10122  SourceLocation PointOfInstantiation, FunctionDecl *Decl,
10123  ArrayRef<TemplateArgument> TemplateArgs,
10124  ConstraintSatisfaction &Satisfaction);
10126  const TemplateArgumentList *Args,
10127  SourceLocation Loc);
10128  void InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
10129  FunctionDecl *Function,
10130  bool Recursive = false,
10131  bool DefinitionRequired = false,
10132  bool AtEndOfTU = false);
10134  VarTemplateDecl *VarTemplate, VarDecl *FromVar,
10135  const TemplateArgumentList &TemplateArgList,
10136  const TemplateArgumentListInfo &TemplateArgsInfo,
10138  SourceLocation PointOfInstantiation,
10139  LateInstantiatedAttrVec *LateAttrs = nullptr,
10140  LocalInstantiationScope *StartingScope = nullptr);
10142  VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl,
10143  const MultiLevelTemplateArgumentList &TemplateArgs);
10144  void
10145  BuildVariableInstantiation(VarDecl *NewVar, VarDecl *OldVar,
10146  const MultiLevelTemplateArgumentList &TemplateArgs,
10147  LateInstantiatedAttrVec *LateAttrs,
10148  DeclContext *Owner,
10149  LocalInstantiationScope *StartingScope,
10150  bool InstantiatingVarTemplate = false,
10151  VarTemplateSpecializationDecl *PrevVTSD = nullptr);
10152 
10154  VarDecl *Var, VarDecl *OldVar,
10155  const MultiLevelTemplateArgumentList &TemplateArgs);
10156  void InstantiateVariableDefinition(SourceLocation PointOfInstantiation,
10157  VarDecl *Var, bool Recursive = false,
10158  bool DefinitionRequired = false,
10159  bool AtEndOfTU = false);
10160 
10162  const CXXConstructorDecl *Tmpl,
10163  const MultiLevelTemplateArgumentList &TemplateArgs);
10164 
10166  const MultiLevelTemplateArgumentList &TemplateArgs,
10167  bool FindingInstantiatedContext = false);
10169  const MultiLevelTemplateArgumentList &TemplateArgs);
10170 
10171  // Objective-C declarations.
10173  OCK_None = -1,
10180  };
10182 
10184  ObjCTypeParamVariance variance,
10185  SourceLocation varianceLoc,
10186  unsigned index,
10187  IdentifierInfo *paramName,
10188  SourceLocation paramLoc,
10189  SourceLocation colonLoc,
10190  ParsedType typeBound);
10191 
10193  ArrayRef<Decl *> typeParams,
10194  SourceLocation rAngleLoc);
10195  void popObjCTypeParamList(Scope *S, ObjCTypeParamList *typeParamList);
10196 
10198  Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName,
10199  SourceLocation ClassLoc, ObjCTypeParamList *typeParamList,
10200  IdentifierInfo *SuperName, SourceLocation SuperLoc,
10201  ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange,
10202  Decl *const *ProtoRefs, unsigned NumProtoRefs,
10203  const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc,
10204  const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody);
10205 
10207  SourceLocation AtInterfaceLoc,
10208  ObjCInterfaceDecl *IDecl,
10209  IdentifierInfo *ClassName,
10210  SourceLocation ClassLoc,
10211  IdentifierInfo *SuperName,
10212  SourceLocation SuperLoc,
10213  ArrayRef<ParsedType> SuperTypeArgs,
10214  SourceRange SuperTypeArgsRange);
10215 
10217  SmallVectorImpl<SourceLocation> &ProtocolLocs,
10218  IdentifierInfo *SuperName,
10219  SourceLocation SuperLoc);
10220 
10222  SourceLocation AtCompatibilityAliasLoc,
10223  IdentifierInfo *AliasName, SourceLocation AliasLocation,
10224  IdentifierInfo *ClassName, SourceLocation ClassLocation);
10225 
10227  IdentifierInfo *PName,
10228  SourceLocation &PLoc, SourceLocation PrevLoc,
10229  const ObjCList<ObjCProtocolDecl> &PList);
10230 
10232  SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName,
10233  SourceLocation ProtocolLoc, Decl *const *ProtoRefNames,
10234  unsigned NumProtoRefs, const SourceLocation *ProtoLocs,
10235  SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList,
10236  SkipBodyInfo *SkipBody);
10237 
10239  SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName,
10240  SourceLocation ClassLoc, ObjCTypeParamList *typeParamList,
10241  IdentifierInfo *CategoryName, SourceLocation CategoryLoc,
10242  Decl *const *ProtoRefs, unsigned NumProtoRefs,
10243  const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc,
10244  const ParsedAttributesView &AttrList);
10245 
10247  SourceLocation AtClassImplLoc, IdentifierInfo *ClassName,
10248  SourceLocation ClassLoc, IdentifierInfo *SuperClassname,
10249  SourceLocation SuperClassLoc, const ParsedAttributesView &AttrList);
10250 
10252  SourceLocation AtCatImplLoc, IdentifierInfo *ClassName,
10253  SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc,
10254  const ParsedAttributesView &AttrList);
10255 
10257  ArrayRef<Decl *> Decls);
10258 
10260  IdentifierInfo **IdentList,
10261  SourceLocation *IdentLocs,
10262  ArrayRef<ObjCTypeParamList *> TypeParamLists,
10263  unsigned NumElts);
10264 
10267  ArrayRef<IdentifierLocPair> IdentList,
10268  const ParsedAttributesView &attrList);
10269 
10270  void FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer,
10271  ArrayRef<IdentifierLocPair> ProtocolId,
10272  SmallVectorImpl<Decl *> &Protocols);
10273 
10275  SourceLocation ProtocolLoc,
10276  IdentifierInfo *TypeArgId,
10277  SourceLocation TypeArgLoc,
10278  bool SelectProtocolFirst = false);
10279 
10280  /// Given a list of identifiers (and their locations), resolve the
10281  /// names to either Objective-C protocol qualifiers or type
10282  /// arguments, as appropriate.
10284  Scope *S,
10285  ParsedType baseType,
10286  SourceLocation lAngleLoc,
10287  ArrayRef<IdentifierInfo *> identifiers,
10288  ArrayRef<SourceLocation> identifierLocs,
10289  SourceLocation rAngleLoc,
10290  SourceLocation &typeArgsLAngleLoc,
10291  SmallVectorImpl<ParsedType> &typeArgs,
10292  SourceLocation &typeArgsRAngleLoc,
10293  SourceLocation &protocolLAngleLoc,
10294  SmallVectorImpl<Decl *> &protocols,
10295  SourceLocation &protocolRAngleLoc,
10296  bool warnOnIncompleteProtocols);
10297 
10298  /// Build a an Objective-C protocol-qualified 'id' type where no
10299  /// base type was specified.
10301  SourceLocation lAngleLoc,
10302  ArrayRef<Decl *> protocols,
10303  ArrayRef<SourceLocation> protocolLocs,
10304  SourceLocation rAngleLoc);
10305 
10306  /// Build a specialized and/or protocol-qualified Objective-C type.
10308  Scope *S,
10309  SourceLocation Loc,
10310  ParsedType BaseType,
10311  SourceLocation TypeArgsLAngleLoc,
10312  ArrayRef<ParsedType> TypeArgs,
10313  SourceLocation TypeArgsRAngleLoc,
10314  SourceLocation ProtocolLAngleLoc,
10315  ArrayRef<Decl *> Protocols,
10316  ArrayRef<SourceLocation> ProtocolLocs,
10317  SourceLocation ProtocolRAngleLoc);
10318 
10319  /// Build an Objective-C type parameter type.
10321  SourceLocation ProtocolLAngleLoc,
10322  ArrayRef<ObjCProtocolDecl *> Protocols,
10323  ArrayRef<SourceLocation> ProtocolLocs,
10324  SourceLocation ProtocolRAngleLoc,
10325  bool FailOnError = false);
10326 
10327  /// Build an Objective-C object pointer type.
10329  QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc,
10330  ArrayRef<TypeSourceInfo *> TypeArgs, SourceLocation TypeArgsRAngleLoc,
10331  SourceLocation ProtocolLAngleLoc, ArrayRef<ObjCProtocolDecl *> Protocols,
10332  ArrayRef<SourceLocation> ProtocolLocs, SourceLocation ProtocolRAngleLoc,
10333  bool FailOnError, bool Rebuilding);
10334 
10335  /// Ensure attributes are consistent with type.
10336  /// \param [in, out] Attributes The attributes to check; they will
10337  /// be modified to be consistent with \p PropertyTy.
10338  void CheckObjCPropertyAttributes(Decl *PropertyPtrTy,
10339  SourceLocation Loc,
10340  unsigned &Attributes,
10341  bool propertyInPrimaryClass);
10342 
10343  /// Process the specified property declaration and create decls for the
10344  /// setters and getters as needed.
10345  /// \param property The property declaration being processed
10346  void ProcessPropertyDecl(ObjCPropertyDecl *property);
10347 
10348 
10350  ObjCPropertyDecl *SuperProperty,
10351  const IdentifierInfo *Name,
10352  bool OverridingProtocolProperty);
10353 
10356 
10357  Decl *ActOnAtEnd(Scope *S, SourceRange AtEnd,
10358  ArrayRef<Decl *> allMethods = std::nullopt,
10359  ArrayRef<DeclGroupPtrTy> allTUVars = std::nullopt);
10360 
10362  SourceLocation LParenLoc,
10363  FieldDeclarator &FD, ObjCDeclSpec &ODS,
10364  Selector GetterSel, Selector SetterSel,
10365  tok::ObjCKeywordKind MethodImplKind,
10366  DeclContext *lexicalDC = nullptr);
10367 
10369  SourceLocation AtLoc,
10370  SourceLocation PropertyLoc,
10371  bool ImplKind,
10372  IdentifierInfo *PropertyId,
10373  IdentifierInfo *PropertyIvar,
10374  SourceLocation PropertyIvarLoc,
10375  ObjCPropertyQueryKind QueryKind);
10376 
10384  };
10385 
10386  struct ObjCArgInfo {
10389  // The Type is null if no type was specified, and the DeclSpec is invalid
10390  // in this case.
10393 
10394  /// ArgAttrs - Attribute list for this argument.
10396  };
10397 
10399  Scope *S,
10400  SourceLocation BeginLoc, // location of the + or -.
10401  SourceLocation EndLoc, // location of the ; or {.
10402  tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType,
10403  ArrayRef<SourceLocation> SelectorLocs, Selector Sel,
10404  // optional arguments. The number of types/arguments is obtained
10405  // from the Sel.getNumArgs().
10406  ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo,
10407  unsigned CNumArgs, // c-style args
10408  const ParsedAttributesView &AttrList, tok::ObjCKeywordKind MethodImplKind,
10409  bool isVariadic, bool MethodDefinition);
10410 
10412  const ObjCObjectPointerType *OPT,
10413  bool IsInstance);
10415  bool IsInstance);
10416 
10417  bool CheckARCMethodDecl(ObjCMethodDecl *method);
10419 
10421 
10422  ExprResult
10424  Expr *BaseExpr,
10425  SourceLocation OpLoc,
10426  DeclarationName MemberName,
10427  SourceLocation MemberLoc,
10428  SourceLocation SuperLoc, QualType SuperType,
10429  bool Super);
10430 
10431  ExprResult
10433  IdentifierInfo &propertyName,
10434  SourceLocation receiverNameLoc,
10435  SourceLocation propertyNameLoc);
10436 
10438 
10439  /// Describes the kind of message expression indicated by a message
10440  /// send that starts with an identifier.
10442  /// The message is sent to 'super'.
10444  /// The message is an instance message.
10446  /// The message is a class message, and the identifier is a type
10447  /// name.
10449  };
10450 
10452  IdentifierInfo *Name,
10453  SourceLocation NameLoc,
10454  bool IsSuper,
10455  bool HasTrailingDot,
10456  ParsedType &ReceiverType);
10457 
10459  Selector Sel,
10460  SourceLocation LBracLoc,
10461  ArrayRef<SourceLocation> SelectorLocs,
10462  SourceLocation RBracLoc,
10463  MultiExprArg Args);
10464 
10465  ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
10466  QualType ReceiverType,
10467  SourceLocation SuperLoc,
10468  Selector Sel,
10469  ObjCMethodDecl *Method,
10470  SourceLocation LBracLoc,
10471  ArrayRef<SourceLocation> SelectorLocs,
10472  SourceLocation RBracLoc,
10473  MultiExprArg Args,
10474  bool isImplicit = false);
10475 
10477  bool isSuperReceiver,
10478  SourceLocation Loc,
10479  Selector Sel,
10480  ObjCMethodDecl *Method,
10481  MultiExprArg Args);
10482 
10484  ParsedType Receiver,
10485  Selector Sel,
10486  SourceLocation LBracLoc,
10487  ArrayRef<SourceLocation> SelectorLocs,
10488  SourceLocation RBracLoc,
10489  MultiExprArg Args);
10490 
10492  QualType ReceiverType,
10493  SourceLocation SuperLoc,
10494  Selector Sel,
10495  ObjCMethodDecl *Method,
10496  SourceLocation LBracLoc,
10497  ArrayRef<SourceLocation> SelectorLocs,
10498  SourceLocation RBracLoc,
10499  MultiExprArg Args,
10500  bool isImplicit = false);
10501 
10503  QualType ReceiverType,
10504  SourceLocation Loc,
10505  Selector Sel,
10506  ObjCMethodDecl *Method,
10507  MultiExprArg Args);
10508 
10510  Expr *Receiver,
10511  Selector Sel,
10512  SourceLocation LBracLoc,
10513  ArrayRef<SourceLocation> SelectorLocs,
10514  SourceLocation RBracLoc,
10515  MultiExprArg Args);
10516 
10519  SourceLocation BridgeKeywordLoc,
10520  TypeSourceInfo *TSInfo,
10521  Expr *SubExpr);
10522 
10524  SourceLocation LParenLoc,
10526  SourceLocation BridgeKeywordLoc,
10527  ParsedType Type,
10528  SourceLocation RParenLoc,
10529  Expr *SubExpr);
10530 
10531  void CheckTollFreeBridgeCast(QualType castType, Expr *castExpr);
10532 
10534 
10536  CastKind &Kind);
10537 
10539  QualType DestType, QualType SrcType,
10540  ObjCInterfaceDecl *&RelatedClass,
10541  ObjCMethodDecl *&ClassMethod,
10542  ObjCMethodDecl *&InstanceMethod,
10543  TypedefNameDecl *&TDNDecl,
10544  bool CfToNs, bool Diagnose = true);
10545 
10547  QualType DestType, QualType SrcType,
10548  Expr *&SrcExpr, bool Diagnose = true);
10549 
10550  bool CheckConversionToObjCLiteral(QualType DstType, Expr *&SrcExpr,
10551  bool Diagnose = true);
10552 
10553  bool checkInitMethod(ObjCMethodDecl *method, QualType receiverTypeIfCall);
10554 
10555  /// Check whether the given new method is a valid override of the
10556  /// given overridden method, and set any properties that should be inherited.
10557  void CheckObjCMethodOverride(ObjCMethodDecl *NewMethod,
10558  const ObjCMethodDecl *Overridden);
10559 
10560  /// Describes the compatibility of a result type with its method.
10565  };
10566 
10568  ObjCMethodDecl *overridden);
10569 
10570  void CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod,
10571  ObjCInterfaceDecl *CurrentClass,
10573 
10575  POAK_Native, // #pragma options align=native
10576  POAK_Natural, // #pragma options align=natural
10577  POAK_Packed, // #pragma options align=packed
10578  POAK_Power, // #pragma options align=power
10579  POAK_Mac68k, // #pragma options align=mac68k
10580  POAK_Reset // #pragma options align=reset
10581  };
10582 
10583  /// ActOnPragmaClangSection - Called on well formed \#pragma clang section
10584  void ActOnPragmaClangSection(SourceLocation PragmaLoc,
10585  PragmaClangSectionAction Action,
10586  PragmaClangSectionKind SecKind, StringRef SecName);
10587 
10588  /// ActOnPragmaOptionsAlign - Called on well formed \#pragma options align.
10590  SourceLocation PragmaLoc);
10591 
10592  /// ActOnPragmaPack - Called on well formed \#pragma pack(...).
10593  void ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action,
10594  StringRef SlotLabel, Expr *Alignment);
10595 
10599  };
10600 
10602  SourceLocation IncludeLoc);
10604 
10605  /// ActOnPragmaMSStrictGuardStackCheck - Called on well formed \#pragma
10606  /// strict_gs_check.
10608  PragmaMsStackAction Action,
10609  bool Value);
10610 
10611  /// ActOnPragmaMSStruct - Called on well formed \#pragma ms_struct [on|off].
10613 
10614  /// ActOnPragmaMSComment - Called on well formed
10615  /// \#pragma comment(kind, "arg").
10617  StringRef Arg);
10618 
10619  /// ActOnPragmaMSPointersToMembers - called on well formed \#pragma
10620  /// pointers_to_members(representation method[, general purpose
10621  /// representation]).
10624  SourceLocation PragmaLoc);
10625 
10626  /// Called on well formed \#pragma vtordisp().
10628  SourceLocation PragmaLoc,
10630 
10636  };
10637 
10638  bool UnifySection(StringRef SectionName, int SectionFlags,
10639  NamedDecl *TheDecl);
10640  bool UnifySection(StringRef SectionName,
10641  int SectionFlags,
10642  SourceLocation PragmaSectionLocation);
10643 
10644  /// Called on well formed \#pragma bss_seg/data_seg/const_seg/code_seg.
10645  void ActOnPragmaMSSeg(SourceLocation PragmaLocation,
10646  PragmaMsStackAction Action,
10647  llvm::StringRef StackSlotLabel,
10648  StringLiteral *SegmentName,
10649  llvm::StringRef PragmaName);
10650 
10651  /// Called on well formed \#pragma section().
10652  void ActOnPragmaMSSection(SourceLocation PragmaLocation,
10653  int SectionFlags, StringLiteral *SegmentName);
10654 
10655  /// Called on well-formed \#pragma init_seg().
10656  void ActOnPragmaMSInitSeg(SourceLocation PragmaLocation,
10657  StringLiteral *SegmentName);
10658 
10659  /// Called on well-formed \#pragma alloc_text().
10661  SourceLocation PragmaLocation, StringRef Section,
10662  const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>>
10663  &Functions);
10664 
10665  /// Called on #pragma clang __debug dump II
10667 
10668  /// ActOnPragmaDetectMismatch - Call on well-formed \#pragma detect_mismatch
10669  void ActOnPragmaDetectMismatch(SourceLocation Loc, StringRef Name,
10670  StringRef Value);
10671 
10672  /// Are precise floating point semantics currently enabled?
10674  return !CurFPFeatures.getAllowFPReassociate() &&
10675  !CurFPFeatures.getNoSignedZero() &&
10676  !CurFPFeatures.getAllowReciprocal() &&
10677  !CurFPFeatures.getAllowApproxFunc();
10678  }
10679 
10682 
10683  /// ActOnPragmaFloatControl - Call on well-formed \#pragma float_control
10686 
10687  /// ActOnPragmaUnused - Called on well-formed '\#pragma unused'.
10688  void ActOnPragmaUnused(const Token &Identifier,
10689  Scope *curScope,
10690  SourceLocation PragmaLoc);
10691 
10692  /// ActOnPragmaVisibility - Called on well formed \#pragma GCC visibility... .
10693  void ActOnPragmaVisibility(const IdentifierInfo* VisType,
10694  SourceLocation PragmaLoc);
10695 
10697  SourceLocation Loc);
10698  void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, const WeakInfo &W);
10699 
10700  /// ActOnPragmaWeakID - Called on well formed \#pragma weak ident.
10701  void ActOnPragmaWeakID(IdentifierInfo* WeakName,
10702  SourceLocation PragmaLoc,
10703  SourceLocation WeakNameLoc);
10704 
10705  /// ActOnPragmaRedefineExtname - Called on well formed
10706  /// \#pragma redefine_extname oldname newname.
10708  IdentifierInfo* AliasName,
10709  SourceLocation PragmaLoc,
10710  SourceLocation WeakNameLoc,
10711  SourceLocation AliasNameLoc);
10712 
10713  /// ActOnPragmaWeakAlias - Called on well formed \#pragma weak ident = ident.
10714  void ActOnPragmaWeakAlias(IdentifierInfo* WeakName,
10715  IdentifierInfo* AliasName,
10716  SourceLocation PragmaLoc,
10717  SourceLocation WeakNameLoc,
10718  SourceLocation AliasNameLoc);
10719 
10720  /// ActOnPragmaFPContract - Called on well formed
10721  /// \#pragma {STDC,OPENCL} FP_CONTRACT and
10722  /// \#pragma clang fp contract
10724 
10725  /// Called on well formed
10726  /// \#pragma clang fp reassociate
10727  void ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled);
10728 
10729  /// ActOnPragmaFenvAccess - Called on well formed
10730  /// \#pragma STDC FENV_ACCESS
10731  void ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled);
10732 
10733  /// Called on well formed '\#pragma clang fp' that has option 'exceptions'.
10736 
10737  /// Called to set constant rounding mode for floating point operations.
10738  void ActOnPragmaFEnvRound(SourceLocation Loc, llvm::RoundingMode);
10739 
10740  /// Called to set exception behavior for floating point operations.
10742 
10743  /// AddAlignmentAttributesForRecord - Adds any needed alignment attributes to
10744  /// a the record decl, to handle '\#pragma pack' and '\#pragma options align'.
10746 
10747  /// AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
10749 
10750  /// PushNamespaceVisibilityAttr - Note that we've entered a
10751  /// namespace with a visibility attribute.
10752  void PushNamespaceVisibilityAttr(const VisibilityAttr *Attr,
10753  SourceLocation Loc);
10754 
10755  /// AddPushedVisibilityAttribute - If '\#pragma GCC visibility' was used,
10756  /// add an appropriate visibility attribute.
10758 
10759  /// PopPragmaVisibility - Pop the top element of the visibility stack; used
10760  /// for '\#pragma GCC visibility' and visibility attributes on namespaces.
10761  void PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc);
10762 
10763  /// FreeVisContext - Deallocate and null out VisContext.
10764  void FreeVisContext();
10765 
10766  /// AddCFAuditedAttribute - Check whether we're currently within
10767  /// '\#pragma clang arc_cf_code_audited' and, if so, consider adding
10768  /// the appropriate attribute.
10769  void AddCFAuditedAttribute(Decl *D);
10770 
10771  void ActOnPragmaAttributeAttribute(ParsedAttr &Attribute,
10772  SourceLocation PragmaLoc,
10775  const IdentifierInfo *Namespace);
10776 
10777  /// Called on well-formed '\#pragma clang attribute pop'.
10778  void ActOnPragmaAttributePop(SourceLocation PragmaLoc,
10779  const IdentifierInfo *Namespace);
10780 
10781  /// Adds the attributes that have been specified using the
10782  /// '\#pragma clang attribute push' directives to the given declaration.
10783  void AddPragmaAttributes(Scope *S, Decl *D);
10784 
10786 
10787  /// Called on well formed \#pragma clang optimize.
10788  void ActOnPragmaOptimize(bool On, SourceLocation PragmaLoc);
10789 
10790  /// #pragma optimize("[optimization-list]", on | off).
10791  void ActOnPragmaMSOptimize(SourceLocation Loc, bool IsOn);
10792 
10793  /// Call on well formed \#pragma function.
10794  void
10796  const llvm::SmallVectorImpl<StringRef> &NoBuiltins);
10797 
10798  /// Get the location for the currently active "\#pragma clang optimize
10799  /// off". If this location is invalid, then the state of the pragma is "on".
10802  }
10803 
10804  /// Only called on function definitions; if there is a pragma in scope
10805  /// with the effect of a range-based optnone, consider marking the function
10806  /// with attribute optnone.
10808 
10809  /// Only called on function definitions; if there is a `#pragma alloc_text`
10810  /// that decides which code section the function should be in, add
10811  /// attribute section to the function.
10813 
10814  /// Adds the 'optnone' attribute to the function declaration if there
10815  /// are no conflicts; Loc represents the location causing the 'optnone'
10816  /// attribute to be added (usually because of a pragma).
10818 
10819  /// Only called on function definitions; if there is a MSVC #pragma optimize
10820  /// in scope, consider changing the function's attributes based on the
10821  /// optimization list passed to the pragma.
10823 
10824  /// Only called on function definitions; if there is a pragma in scope
10825  /// with the effect of a range-based no_builtin, consider marking the function
10826  /// with attribute no_builtin.
10828 
10829  /// AddAlignedAttr - Adds an aligned attribute to a particular declaration.
10830  void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E,
10831  bool IsPackExpansion);
10832  void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, TypeSourceInfo *T,
10833  bool IsPackExpansion);
10834 
10835  /// AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular
10836  /// declaration.
10837  void AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E,
10838  Expr *OE);
10839 
10840  /// AddAllocAlignAttr - Adds an alloc_align attribute to a particular
10841  /// declaration.
10842  void AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI,
10843  Expr *ParamExpr);
10844 
10845  /// AddAlignValueAttr - Adds an align_value attribute to a particular
10846  /// declaration.
10847  void AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E);
10848 
10849  /// AddAnnotationAttr - Adds an annotation Annot with Args arguments to D.
10850  void AddAnnotationAttr(Decl *D, const AttributeCommonInfo &CI,
10851  StringRef Annot, MutableArrayRef<Expr *> Args);
10852 
10853  /// ConstantFoldAttrArgs - Folds attribute arguments into ConstantExprs
10854  /// (unless they are value dependent or type dependent). Returns false
10855  /// and emits a diagnostic if one or more of the arguments could not be
10856  /// folded into a constant.
10859 
10860  /// AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular
10861  /// declaration.
10862  void AddLaunchBoundsAttr(Decl *D, const AttributeCommonInfo &CI,
10863  Expr *MaxThreads, Expr *MinBlocks);
10864 
10865  /// AddModeAttr - Adds a mode attribute to a particular declaration.
10866  void AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name,
10867  bool InInstantiation = false);
10868 
10869  void AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI,
10870  ParameterABI ABI);
10871 
10872  enum class RetainOwnershipKind {NS, CF, OS};
10873  void AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI,
10874  RetainOwnershipKind K, bool IsTemplateInstantiation);
10875 
10876  /// addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size
10877  /// attribute to a particular declaration.
10879  Expr *Min, Expr *Max);
10880 
10881  /// addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a
10882  /// particular declaration.
10884  Expr *Min, Expr *Max);
10885 
10887 
10888  //===--------------------------------------------------------------------===//
10889  // C++ Coroutines TS
10890  //
10892  StringRef Keyword);
10896 
10899  UnresolvedLookupExpr *Lookup);
10901  Expr *Awaiter, bool IsImplicit = false);
10903  UnresolvedLookupExpr *Lookup);
10906  bool IsImplicit = false);
10910  void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body);
10911  /// Lookup 'coroutine_traits' in std namespace and std::experimental
10912  /// namespace. The namespace found is recorded in Namespace.
10914  SourceLocation FuncLoc,
10915  NamespaceDecl *&Namespace);
10916  /// Check that the expression co_await promise.final_suspend() shall not be
10917  /// potentially-throwing.
10918  bool checkFinalSuspendNoThrow(const Stmt *FinalSuspend);
10919 
10920  //===--------------------------------------------------------------------===//
10921  // OpenMP directives and clauses.
10922  //
10923 private:
10924  void *VarDataSharingAttributesStack;
10925 
10926  struct DeclareTargetContextInfo {
10927  struct MapInfo {
10928  OMPDeclareTargetDeclAttr::MapTypeTy MT;
10930  };
10931  /// Explicitly listed variables and functions in a 'to' or 'link' clause.
10932  llvm::DenseMap<NamedDecl *, MapInfo> ExplicitlyMapped;
10933 
10934  /// The 'device_type' as parsed from the clause.
10935  OMPDeclareTargetDeclAttr::DevTypeTy DT = OMPDeclareTargetDeclAttr::DT_Any;
10936 
10937  /// The directive kind, `begin declare target` or `declare target`.
10939 
10940  /// The directive with indirect clause.
10941  std::optional<Expr *> Indirect;
10942 
10943  /// The directive location.
10944  SourceLocation Loc;
10945 
10946  DeclareTargetContextInfo(OpenMPDirectiveKind Kind, SourceLocation Loc)
10947  : Kind(Kind), Loc(Loc) {}
10948  };
10949 
10950  /// Number of nested '#pragma omp declare target' directives.
10951  SmallVector<DeclareTargetContextInfo, 4> DeclareTargetNesting;
10952 
10953  /// Initialization of data-sharing attributes stack.
10954  void InitDataSharingAttributesStack();
10955  void DestroyDataSharingAttributesStack();
10956  ExprResult
10957  VerifyPositiveIntegerConstantInClause(Expr *Op, OpenMPClauseKind CKind,
10958  bool StrictlyPositive = true,
10959  bool SuppressExprDiags = false);
10960  /// Returns OpenMP nesting level for current directive.
10961  unsigned getOpenMPNestingLevel() const;
10962 
10963  /// Adjusts the function scopes index for the target-based regions.
10964  void adjustOpenMPTargetScopeIndex(unsigned &FunctionScopesIndex,
10965  unsigned Level) const;
10966 
10967  /// Returns the number of scopes associated with the construct on the given
10968  /// OpenMP level.
10969  int getNumberOfConstructScopes(unsigned Level) const;
10970 
10971  /// Push new OpenMP function region for non-capturing function.
10972  void pushOpenMPFunctionRegion();
10973 
10974  /// Pop OpenMP function region for non-capturing function.
10975  void popOpenMPFunctionRegion(const sema::FunctionScopeInfo *OldFSI);
10976 
10977  /// Analyzes and checks a loop nest for use by a loop transformation.
10978  ///
10979  /// \param Kind The loop transformation directive kind.
10980  /// \param NumLoops How many nested loops the directive is expecting.
10981  /// \param AStmt Associated statement of the transformation directive.
10982  /// \param LoopHelpers [out] The loop analysis result.
10983  /// \param Body [out] The body code nested in \p NumLoops loop.
10984  /// \param OriginalInits [out] Collection of statements and declarations that
10985  /// must have been executed/declared before entering the
10986  /// loop.
10987  ///
10988  /// \return Whether there was any error.
10989  bool checkTransformableLoopNest(
10990  OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops,
10992  Stmt *&Body,
10993  SmallVectorImpl<SmallVector<llvm::PointerUnion<Stmt *, Decl *>, 0>>
10994  &OriginalInits);
10995 
10996  /// Helper to keep information about the current `omp begin/end declare
10997  /// variant` nesting.
10998  struct OMPDeclareVariantScope {
10999  /// The associated OpenMP context selector.
11000  OMPTraitInfo *TI;
11001 
11002  /// The associated OpenMP context selector mangling.
11003  std::string NameSuffix;
11004 
11005  OMPDeclareVariantScope(OMPTraitInfo &TI);
11006  };
11007 
11008  /// Return the OMPTraitInfo for the surrounding scope, if any.
11009  OMPTraitInfo *getOMPTraitInfoForSurroundingScope() {
11010  return OMPDeclareVariantScopes.empty() ? nullptr
11011  : OMPDeclareVariantScopes.back().TI;
11012  }
11013 
11014  /// The current `omp begin/end declare variant` scopes.
11015  SmallVector<OMPDeclareVariantScope, 4> OMPDeclareVariantScopes;
11016 
11017  /// The current `omp begin/end assumes` scopes.
11018  SmallVector<AssumptionAttr *, 4> OMPAssumeScoped;
11019 
11020  /// All `omp assumes` we encountered so far.
11021  SmallVector<AssumptionAttr *, 4> OMPAssumeGlobal;
11022 
11023 public:
11024  /// The declarator \p D defines a function in the scope \p S which is nested
11025  /// in an `omp begin/end declare variant` scope. In this method we create a
11026  /// declaration for \p D and rename \p D according to the OpenMP context
11027  /// selector of the surrounding scope. Return all base functions in \p Bases.
11029  Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists,
11030  SmallVectorImpl<FunctionDecl *> &Bases);
11031 
11032  /// Register \p D as specialization of all base functions in \p Bases in the
11033  /// current `omp begin/end declare variant` scope.
11035  Decl *D, SmallVectorImpl<FunctionDecl *> &Bases);
11036 
11037  /// Act on \p D, a function definition inside of an `omp [begin/end] assumes`.
11039 
11040  /// Can we exit an OpenMP declare variant scope at the moment.
11042  return !OMPDeclareVariantScopes.empty();
11043  }
11044 
11045  /// Given the potential call expression \p Call, determine if there is a
11046  /// specialization via the OpenMP declare variant mechanism available. If
11047  /// there is, return the specialized call expression, otherwise return the
11048  /// original \p Call.
11050  SourceLocation LParenLoc, MultiExprArg ArgExprs,
11051  SourceLocation RParenLoc, Expr *ExecConfig);
11052 
11053  /// Handle a `omp begin declare variant`.
11055 
11056  /// Handle a `omp end declare variant`.
11058 
11059  /// Checks if the variant/multiversion functions are compatible.
11061  const FunctionDecl *OldFD, const FunctionDecl *NewFD,
11062  const PartialDiagnostic &NoProtoDiagID,
11063  const PartialDiagnosticAt &NoteCausedDiagIDAt,
11064  const PartialDiagnosticAt &NoSupportDiagIDAt,
11065  const PartialDiagnosticAt &DiffDiagIDAt, bool TemplatesSupported,
11066  bool ConstexprSupported, bool CLinkageMayDiffer);
11067 
11068  /// Function tries to capture lambda's captured variables in the OpenMP region
11069  /// before the original lambda is captured.
11071 
11072  /// Return true if the provided declaration \a VD should be captured by
11073  /// reference.
11074  /// \param Level Relative level of nested OpenMP construct for that the check
11075  /// is performed.
11076  /// \param OpenMPCaptureLevel Capture level within an OpenMP construct.
11077  bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level,
11078  unsigned OpenMPCaptureLevel) const;
11079 
11080  /// Check if the specified variable is used in one of the private
11081  /// clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP
11082  /// constructs.
11083  VarDecl *isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo = false,
11084  unsigned StopAt = 0);
11085 
11086  /// The member expression(this->fd) needs to be rebuilt in the template
11087  /// instantiation to generate private copy for OpenMP when default
11088  /// clause is used. The function will return true if default
11089  /// cluse is used.
11091 
11093  ExprObjectKind OK, SourceLocation Loc);
11094 
11095  /// If the current region is a loop-based region, mark the start of the loop
11096  /// construct.
11097  void startOpenMPLoop();
11098 
11099  /// If the current region is a range loop-based region, mark the start of the
11100  /// loop construct.
11101  void startOpenMPCXXRangeFor();
11102 
11103  /// Check if the specified variable is used in 'private' clause.
11104  /// \param Level Relative level of nested OpenMP construct for that the check
11105  /// is performed.
11107  unsigned CapLevel) const;
11108 
11109  /// Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.)
11110  /// for \p FD based on DSA for the provided corresponding captured declaration
11111  /// \p D.
11112  void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level);
11113 
11114  /// Check if the specified variable is captured by 'target' directive.
11115  /// \param Level Relative level of nested OpenMP construct for that the check
11116  /// is performed.
11117  bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level,
11118  unsigned CaptureLevel) const;
11119 
11120  /// Check if the specified global variable must be captured by outer capture
11121  /// regions.
11122  /// \param Level Relative level of nested OpenMP construct for that
11123  /// the check is performed.
11124  bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level,
11125  unsigned CaptureLevel) const;
11126 
11128  Expr *Op);
11129  /// Called on start of new data sharing attribute block.
11131  const DeclarationNameInfo &DirName, Scope *CurScope,
11132  SourceLocation Loc);
11133  /// Start analysis of clauses.
11135  /// End analysis of clauses.
11136  void EndOpenMPClause();
11137  /// Called on end of data sharing attribute block.
11138  void EndOpenMPDSABlock(Stmt *CurDirective);
11139 
11140  /// Check if the current region is an OpenMP loop region and if it is,
11141  /// mark loop control variable, used in \p Init for loop initialization, as
11142  /// private by default.
11143  /// \param Init First part of the for loop.
11145 
11146  /// Called on well-formed '\#pragma omp metadirective' after parsing
11147  /// of the associated statement.
11149  Stmt *AStmt, SourceLocation StartLoc,
11150  SourceLocation EndLoc);
11151 
11152  // OpenMP directives and clauses.
11153  /// Called on correct id-expression from the '#pragma omp
11154  /// threadprivate'.
11155  ExprResult ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec,
11156  const DeclarationNameInfo &Id,
11158  /// Called on well-formed '#pragma omp threadprivate'.
11160  SourceLocation Loc,
11161  ArrayRef<Expr *> VarList);
11162  /// Builds a new OpenMPThreadPrivateDecl and checks its correctness.
11164  ArrayRef<Expr *> VarList);
11165  /// Called on well-formed '#pragma omp allocate'.
11167  ArrayRef<Expr *> VarList,
11168  ArrayRef<OMPClause *> Clauses,
11169  DeclContext *Owner = nullptr);
11170 
11171  /// Called on well-formed '#pragma omp [begin] assume[s]'.
11173  OpenMPDirectiveKind DKind,
11174  ArrayRef<std::string> Assumptions,
11175  bool SkippedClauses);
11176 
11177  /// Check if there is an active global `omp begin assumes` directive.
11178  bool isInOpenMPAssumeScope() const { return !OMPAssumeScoped.empty(); }
11179 
11180  /// Check if there is an active global `omp assumes` directive.
11181  bool hasGlobalOpenMPAssumes() const { return !OMPAssumeGlobal.empty(); }
11182 
11183  /// Called on well-formed '#pragma omp end assumes'.
11185 
11186  /// Called on well-formed '#pragma omp requires'.
11188  ArrayRef<OMPClause *> ClauseList);
11189  /// Check restrictions on Requires directive
11191  ArrayRef<OMPClause *> Clauses);
11192  /// Check if the specified type is allowed to be used in 'omp declare
11193  /// reduction' construct.
11196  /// Called on start of '#pragma omp declare reduction'.
11198  Scope *S, DeclContext *DC, DeclarationName Name,
11199  ArrayRef<std::pair<QualType, SourceLocation>> ReductionTypes,
11200  AccessSpecifier AS, Decl *PrevDeclInScope = nullptr);
11201  /// Initialize declare reduction construct initializer.
11203  /// Finish current declare reduction construct initializer.
11204  void ActOnOpenMPDeclareReductionCombinerEnd(Decl *D, Expr *Combiner);
11205  /// Initialize declare reduction construct initializer.
11206  /// \return omp_priv variable.
11208  /// Finish current declare reduction construct initializer.
11209  void ActOnOpenMPDeclareReductionInitializerEnd(Decl *D, Expr *Initializer,
11210  VarDecl *OmpPrivParm);
11211  /// Called at the end of '#pragma omp declare reduction'.
11213  Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid);
11214 
11215  /// Check variable declaration in 'omp declare mapper' construct.
11217  /// Check if the specified type is allowed to be used in 'omp declare
11218  /// mapper' construct.
11221  /// Called on start of '#pragma omp declare mapper'.
11223  Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType,
11225  Expr *MapperVarRef, ArrayRef<OMPClause *> Clauses,
11226  Decl *PrevDeclInScope = nullptr);
11227  /// Build the mapper variable of '#pragma omp declare mapper'.
11229  QualType MapperType,
11230  SourceLocation StartLoc,
11231  DeclarationName VN);
11233  bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const;
11235 
11236  /// Called on the start of target region i.e. '#pragma omp declare target'.
11237  bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
11238 
11239  /// Called at the end of target region i.e. '#pragma omp end declare target'.
11240  const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective();
11241 
11242  /// Called once a target context is completed, that can be when a
11243  /// '#pragma omp end declare target' was encountered or when a
11244  /// '#pragma omp declare target' without declaration-definition-seq was
11245  /// encountered.
11246  void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
11247 
11248  /// Report unterminated 'omp declare target' or 'omp begin declare target' at
11249  /// the end of a compilation unit.
11251 
11252  /// Searches for the provided declaration name for OpenMP declare target
11253  /// directive.
11255  CXXScopeSpec &ScopeSpec,
11256  const DeclarationNameInfo &Id);
11257 
11258  /// Called on correct id-expression from the '#pragma omp declare target'.
11260  OMPDeclareTargetDeclAttr::MapTypeTy MT,
11261  DeclareTargetContextInfo &DTCI);
11262 
11263  /// Check declaration inside target region.
11264  void
11266  SourceLocation IdLoc = SourceLocation());
11267  /// Finishes analysis of the deferred functions calls that may be declared as
11268  /// host/nohost during device/host compilation.
11269  void finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller,
11270  const FunctionDecl *Callee,
11271  SourceLocation Loc);
11272 
11273  /// Return true if currently in OpenMP task with untied clause context.
11274  bool isInOpenMPTaskUntiedContext() const;
11275 
11276  /// Return true inside OpenMP declare target region.
11278  return !DeclareTargetNesting.empty();
11279  }
11280  /// Return true inside OpenMP target region.
11282 
11283  /// Return the number of captured regions created for an OpenMP directive.
11285 
11286  /// Initialization of captured region for OpenMP region.
11287  void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope);
11288 
11289  /// Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to
11290  /// an OpenMP loop directive.
11292 
11293  /// Process a canonical OpenMP loop nest that can either be a canonical
11294  /// literal loop (ForStmt or CXXForRangeStmt), or the generated loop of an
11295  /// OpenMP loop transformation construct.
11297 
11298  /// End of OpenMP region.
11299  ///
11300  /// \param S Statement associated with the current OpenMP region.
11301  /// \param Clauses List of clauses for the current OpenMP region.
11302  ///
11303  /// \returns Statement for finished OpenMP region.
11307  OpenMPDirectiveKind CancelRegion, ArrayRef<OMPClause *> Clauses,
11308  Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc);
11309  /// Called on well-formed '\#pragma omp parallel' after parsing
11310  /// of the associated statement.
11312  Stmt *AStmt,
11313  SourceLocation StartLoc,
11314  SourceLocation EndLoc);
11315  using VarsWithInheritedDSAType =
11316  llvm::SmallDenseMap<const ValueDecl *, const Expr *, 4>;
11317  /// Called on well-formed '\#pragma omp simd' after parsing
11318  /// of the associated statement.
11319  StmtResult
11321  SourceLocation StartLoc, SourceLocation EndLoc,
11322  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11323  /// Called on well-formed '#pragma omp tile' after parsing of its clauses and
11324  /// the associated statement.
11326  Stmt *AStmt, SourceLocation StartLoc,
11327  SourceLocation EndLoc);
11328  /// Called on well-formed '#pragma omp unroll' after parsing of its clauses
11329  /// and the associated statement.
11331  Stmt *AStmt, SourceLocation StartLoc,
11332  SourceLocation EndLoc);
11333  /// Called on well-formed '\#pragma omp for' after parsing
11334  /// of the associated statement.
11335  StmtResult
11337  SourceLocation StartLoc, SourceLocation EndLoc,
11338  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11339  /// Called on well-formed '\#pragma omp for simd' after parsing
11340  /// of the associated statement.
11341  StmtResult
11343  SourceLocation StartLoc, SourceLocation EndLoc,
11344  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11345  /// Called on well-formed '\#pragma omp sections' after parsing
11346  /// of the associated statement.
11348  Stmt *AStmt, SourceLocation StartLoc,
11349  SourceLocation EndLoc);
11350  /// Called on well-formed '\#pragma omp section' after parsing of the
11351  /// associated statement.
11353  SourceLocation EndLoc);
11354  /// Called on well-formed '\#pragma omp single' after parsing of the
11355  /// associated statement.
11357  Stmt *AStmt, SourceLocation StartLoc,
11358  SourceLocation EndLoc);
11359  /// Called on well-formed '\#pragma omp master' after parsing of the
11360  /// associated statement.
11362  SourceLocation EndLoc);
11363  /// Called on well-formed '\#pragma omp critical' after parsing of the
11364  /// associated statement.
11366  ArrayRef<OMPClause *> Clauses,
11367  Stmt *AStmt, SourceLocation StartLoc,
11368  SourceLocation EndLoc);
11369  /// Called on well-formed '\#pragma omp parallel for' after parsing
11370  /// of the associated statement.
11372  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11373  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11374  /// Called on well-formed '\#pragma omp parallel for simd' after
11375  /// parsing of the associated statement.
11377  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11378  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11379  /// Called on well-formed '\#pragma omp parallel master' after
11380  /// parsing of the associated statement.
11382  Stmt *AStmt,
11383  SourceLocation StartLoc,
11384  SourceLocation EndLoc);
11385  /// Called on well-formed '\#pragma omp parallel masked' after
11386  /// parsing of the associated statement.
11388  Stmt *AStmt,
11389  SourceLocation StartLoc,
11390  SourceLocation EndLoc);
11391  /// Called on well-formed '\#pragma omp parallel sections' after
11392  /// parsing of the associated statement.
11394  Stmt *AStmt,
11395  SourceLocation StartLoc,
11396  SourceLocation EndLoc);
11397  /// Called on well-formed '\#pragma omp task' after parsing of the
11398  /// associated statement.
11400  Stmt *AStmt, SourceLocation StartLoc,
11401  SourceLocation EndLoc);
11402  /// Called on well-formed '\#pragma omp taskyield'.
11404  SourceLocation EndLoc);
11405  /// Called on well-formed '\#pragma omp error'.
11406  /// Error direcitive is allowed in both declared and excutable contexts.
11407  /// Adding InExContext to identify which context is called from.
11409  SourceLocation StartLoc,
11410  SourceLocation EndLoc,
11411  bool InExContext = true);
11412  /// Called on well-formed '\#pragma omp barrier'.
11414  SourceLocation EndLoc);
11415  /// Called on well-formed '\#pragma omp taskwait'.
11417  SourceLocation StartLoc,
11418  SourceLocation EndLoc);
11419  /// Called on well-formed '\#pragma omp taskgroup'.
11421  Stmt *AStmt, SourceLocation StartLoc,
11422  SourceLocation EndLoc);
11423  /// Called on well-formed '\#pragma omp flush'.
11425  SourceLocation StartLoc,
11426  SourceLocation EndLoc);
11427  /// Called on well-formed '\#pragma omp depobj'.
11429  SourceLocation StartLoc,
11430  SourceLocation EndLoc);
11431  /// Called on well-formed '\#pragma omp scan'.
11433  SourceLocation StartLoc,
11434  SourceLocation EndLoc);
11435  /// Called on well-formed '\#pragma omp ordered' after parsing of the
11436  /// associated statement.
11438  Stmt *AStmt, SourceLocation StartLoc,
11439  SourceLocation EndLoc);
11440  /// Called on well-formed '\#pragma omp atomic' after parsing of the
11441  /// associated statement.
11443  Stmt *AStmt, SourceLocation StartLoc,
11444  SourceLocation EndLoc);
11445  /// Called on well-formed '\#pragma omp target' after parsing of the
11446  /// associated statement.
11448  Stmt *AStmt, SourceLocation StartLoc,
11449  SourceLocation EndLoc);
11450  /// Called on well-formed '\#pragma omp target data' after parsing of
11451  /// the associated statement.
11453  Stmt *AStmt, SourceLocation StartLoc,
11454  SourceLocation EndLoc);
11455  /// Called on well-formed '\#pragma omp target enter data' after
11456  /// parsing of the associated statement.
11458  SourceLocation StartLoc,
11459  SourceLocation EndLoc,
11460  Stmt *AStmt);
11461  /// Called on well-formed '\#pragma omp target exit data' after
11462  /// parsing of the associated statement.
11464  SourceLocation StartLoc,
11465  SourceLocation EndLoc,
11466  Stmt *AStmt);
11467  /// Called on well-formed '\#pragma omp target parallel' after
11468  /// parsing of the associated statement.
11470  Stmt *AStmt,
11471  SourceLocation StartLoc,
11472  SourceLocation EndLoc);
11473  /// Called on well-formed '\#pragma omp target parallel for' after
11474  /// parsing of the associated statement.
11476  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11477  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11478  /// Called on well-formed '\#pragma omp teams' after parsing of the
11479  /// associated statement.
11481  Stmt *AStmt, SourceLocation StartLoc,
11482  SourceLocation EndLoc);
11483  /// Called on well-formed '\#pragma omp teams loop' after parsing of the
11484  /// associated statement.
11486  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11487  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11488  /// Called on well-formed '\#pragma omp target teams loop' after parsing of
11489  /// the associated statement.
11491  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11492  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11493  /// Called on well-formed '\#pragma omp parallel loop' after parsing of the
11494  /// associated statement.
11496  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11497  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11498  /// Called on well-formed '\#pragma omp target parallel loop' after parsing
11499  /// of the associated statement.
11501  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11502  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11503  /// Called on well-formed '\#pragma omp cancellation point'.
11504  StmtResult
11506  SourceLocation EndLoc,
11507  OpenMPDirectiveKind CancelRegion);
11508  /// Called on well-formed '\#pragma omp cancel'.
11510  SourceLocation StartLoc,
11511  SourceLocation EndLoc,
11512  OpenMPDirectiveKind CancelRegion);
11513  /// Called on well-formed '\#pragma omp taskloop' after parsing of the
11514  /// associated statement.
11515  StmtResult
11517  SourceLocation StartLoc, SourceLocation EndLoc,
11518  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11519  /// Called on well-formed '\#pragma omp taskloop simd' after parsing of
11520  /// the associated statement.
11522  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11523  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11524  /// Called on well-formed '\#pragma omp master taskloop' after parsing of the
11525  /// associated statement.
11527  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11528  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11529  /// Called on well-formed '\#pragma omp master taskloop simd' after parsing of
11530  /// the associated statement.
11532  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11533  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11534  /// Called on well-formed '\#pragma omp parallel master taskloop' after
11535  /// parsing of the associated statement.
11537  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11538  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11539  /// Called on well-formed '\#pragma omp parallel master taskloop simd' after
11540  /// parsing of the associated statement.
11542  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11543  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11544  /// Called on well-formed '\#pragma omp masked taskloop' after parsing of the
11545  /// associated statement.
11547  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11548  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11549  /// Called on well-formed '\#pragma omp masked taskloop simd' after parsing of
11550  /// the associated statement.
11552  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11553  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11554  /// Called on well-formed '\#pragma omp parallel masked taskloop' after
11555  /// parsing of the associated statement.
11557  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11558  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11559  /// Called on well-formed '\#pragma omp parallel masked taskloop simd' after
11560  /// parsing of the associated statement.
11562  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11563  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11564  /// Called on well-formed '\#pragma omp distribute' after parsing
11565  /// of the associated statement.
11566  StmtResult
11568  SourceLocation StartLoc, SourceLocation EndLoc,
11569  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11570  /// Called on well-formed '\#pragma omp target update'.
11572  SourceLocation StartLoc,
11573  SourceLocation EndLoc,
11574  Stmt *AStmt);
11575  /// Called on well-formed '\#pragma omp distribute parallel for' after
11576  /// parsing of the associated statement.
11578  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11579  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11580  /// Called on well-formed '\#pragma omp distribute parallel for simd'
11581  /// after parsing of the associated statement.
11583  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11584  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11585  /// Called on well-formed '\#pragma omp distribute simd' after
11586  /// parsing of the associated statement.
11588  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11589  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11590  /// Called on well-formed '\#pragma omp target parallel for simd' after
11591  /// parsing of the associated statement.
11593  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11594  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11595  /// Called on well-formed '\#pragma omp target simd' after parsing of
11596  /// the associated statement.
11597  StmtResult
11599  SourceLocation StartLoc, SourceLocation EndLoc,
11600  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11601  /// Called on well-formed '\#pragma omp teams distribute' after parsing of
11602  /// the associated statement.
11604  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11605  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11606  /// Called on well-formed '\#pragma omp teams distribute simd' after parsing
11607  /// of the associated statement.
11609  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11610  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11611  /// Called on well-formed '\#pragma omp teams distribute parallel for simd'
11612  /// after parsing of the associated statement.
11614  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11615  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11616  /// Called on well-formed '\#pragma omp teams distribute parallel for'
11617  /// after parsing of the associated statement.
11619  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11620  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11621  /// Called on well-formed '\#pragma omp target teams' after parsing of the
11622  /// associated statement.
11624  Stmt *AStmt,
11625  SourceLocation StartLoc,
11626  SourceLocation EndLoc);
11627  /// Called on well-formed '\#pragma omp target teams distribute' after parsing
11628  /// of the associated statement.
11630  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11631  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11632  /// Called on well-formed '\#pragma omp target teams distribute parallel for'
11633  /// after parsing of the associated statement.
11635  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11636  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11637  /// Called on well-formed '\#pragma omp target teams distribute parallel for
11638  /// simd' after parsing of the associated statement.
11640  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11641  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11642  /// Called on well-formed '\#pragma omp target teams distribute simd' after
11643  /// parsing of the associated statement.
11645  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11646  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11647  /// Called on well-formed '\#pragma omp interop'.
11649  SourceLocation StartLoc,
11650  SourceLocation EndLoc);
11651  /// Called on well-formed '\#pragma omp dispatch' after parsing of the
11652  // /associated statement.
11654  Stmt *AStmt, SourceLocation StartLoc,
11655  SourceLocation EndLoc);
11656  /// Called on well-formed '\#pragma omp masked' after parsing of the
11657  // /associated statement.
11659  Stmt *AStmt, SourceLocation StartLoc,
11660  SourceLocation EndLoc);
11661 
11662  /// Called on well-formed '\#pragma omp loop' after parsing of the
11663  /// associated statement.
11665  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11666  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11667 
11668  /// Checks correctness of linear modifiers.
11670  SourceLocation LinLoc);
11671  /// Checks that the specified declaration matches requirements for the linear
11672  /// decls.
11673  bool CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc,
11675  bool IsDeclareSimd = false);
11676 
11677  /// Called on well-formed '\#pragma omp declare simd' after parsing of
11678  /// the associated method/function.
11680  DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS,
11681  Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds,
11682  ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears,
11683  ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR);
11684 
11685  /// Checks '\#pragma omp declare variant' variant function and original
11686  /// functions after parsing of the associated method/function.
11687  /// \param DG Function declaration to which declare variant directive is
11688  /// applied to.
11689  /// \param VariantRef Expression that references the variant function, which
11690  /// must be used instead of the original one, specified in \p DG.
11691  /// \param TI The trait info object representing the match clause.
11692  /// \param NumAppendArgs The number of omp_interop_t arguments to account for
11693  /// in checking.
11694  /// \returns std::nullopt, if the function/variant function are not compatible
11695  /// with the pragma, pair of original function/variant ref expression
11696  /// otherwise.
11697  std::optional<std::pair<FunctionDecl *, Expr *>>
11699  OMPTraitInfo &TI, unsigned NumAppendArgs,
11700  SourceRange SR);
11701 
11702  /// Called on well-formed '\#pragma omp declare variant' after parsing of
11703  /// the associated method/function.
11704  /// \param FD Function declaration to which declare variant directive is
11705  /// applied to.
11706  /// \param VariantRef Expression that references the variant function, which
11707  /// must be used instead of the original one, specified in \p DG.
11708  /// \param TI The context traits associated with the function variant.
11709  /// \param AdjustArgsNothing The list of 'nothing' arguments.
11710  /// \param AdjustArgsNeedDevicePtr The list of 'need_device_ptr' arguments.
11711  /// \param AppendArgs The list of 'append_args' arguments.
11712  /// \param AdjustArgsLoc The Location of an 'adjust_args' clause.
11713  /// \param AppendArgsLoc The Location of an 'append_args' clause.
11714  /// \param SR The SourceRange of the 'declare variant' directive.
11716  FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI,
11717  ArrayRef<Expr *> AdjustArgsNothing,
11718  ArrayRef<Expr *> AdjustArgsNeedDevicePtr,
11719  ArrayRef<OMPInteropInfo> AppendArgs, SourceLocation AdjustArgsLoc,
11720  SourceLocation AppendArgsLoc, SourceRange SR);
11721 
11723  Expr *Expr,
11724  SourceLocation StartLoc,
11725  SourceLocation LParenLoc,
11726  SourceLocation EndLoc);
11727  /// Called on well-formed 'allocator' clause.
11729  SourceLocation StartLoc,
11730  SourceLocation LParenLoc,
11731  SourceLocation EndLoc);
11732  /// Called on well-formed 'if' clause.
11734  Expr *Condition, SourceLocation StartLoc,
11735  SourceLocation LParenLoc,
11736  SourceLocation NameModifierLoc,
11737  SourceLocation ColonLoc,
11738  SourceLocation EndLoc);
11739  /// Called on well-formed 'final' clause.
11740  OMPClause *ActOnOpenMPFinalClause(Expr *Condition, SourceLocation StartLoc,
11741  SourceLocation LParenLoc,
11742  SourceLocation EndLoc);
11743  /// Called on well-formed 'num_threads' clause.
11745  SourceLocation StartLoc,
11746  SourceLocation LParenLoc,
11747  SourceLocation EndLoc);
11748  /// Called on well-formed 'align' clause.
11749  OMPClause *ActOnOpenMPAlignClause(Expr *Alignment, SourceLocation StartLoc,
11750  SourceLocation LParenLoc,
11751  SourceLocation EndLoc);
11752  /// Called on well-formed 'safelen' clause.
11754  SourceLocation StartLoc,
11755  SourceLocation LParenLoc,
11756  SourceLocation EndLoc);
11757  /// Called on well-formed 'simdlen' clause.
11759  SourceLocation LParenLoc,
11760  SourceLocation EndLoc);
11761  /// Called on well-form 'sizes' clause.
11763  SourceLocation StartLoc,
11764  SourceLocation LParenLoc,
11765  SourceLocation EndLoc);
11766  /// Called on well-form 'full' clauses.
11768  SourceLocation EndLoc);
11769  /// Called on well-form 'partial' clauses.
11770  OMPClause *ActOnOpenMPPartialClause(Expr *FactorExpr, SourceLocation StartLoc,
11771  SourceLocation LParenLoc,
11772  SourceLocation EndLoc);
11773  /// Called on well-formed 'collapse' clause.
11775  SourceLocation StartLoc,
11776  SourceLocation LParenLoc,
11777  SourceLocation EndLoc);
11778  /// Called on well-formed 'ordered' clause.
11779  OMPClause *
11781  SourceLocation LParenLoc = SourceLocation(),
11782  Expr *NumForLoops = nullptr);
11783  /// Called on well-formed 'grainsize' clause.
11785  Expr *Size, SourceLocation StartLoc,
11786  SourceLocation LParenLoc,
11787  SourceLocation ModifierLoc,
11788  SourceLocation EndLoc);
11789  /// Called on well-formed 'num_tasks' clause.
11791  Expr *NumTasks, SourceLocation StartLoc,
11792  SourceLocation LParenLoc,
11793  SourceLocation ModifierLoc,
11794  SourceLocation EndLoc);
11795  /// Called on well-formed 'hint' clause.
11797  SourceLocation LParenLoc,
11798  SourceLocation EndLoc);
11799  /// Called on well-formed 'detach' clause.
11801  SourceLocation LParenLoc,
11802  SourceLocation EndLoc);
11803 
11805  unsigned Argument,
11806  SourceLocation ArgumentLoc,
11807  SourceLocation StartLoc,
11808  SourceLocation LParenLoc,
11809  SourceLocation EndLoc);
11810  /// Called on well-formed 'when' clause.
11812  SourceLocation LParenLoc,
11813  SourceLocation EndLoc);
11814  /// Called on well-formed 'default' clause.
11815  OMPClause *ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind,
11816  SourceLocation KindLoc,
11817  SourceLocation StartLoc,
11818  SourceLocation LParenLoc,
11819  SourceLocation EndLoc);
11820  /// Called on well-formed 'proc_bind' clause.
11821  OMPClause *ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind,
11822  SourceLocation KindLoc,
11823  SourceLocation StartLoc,
11824  SourceLocation LParenLoc,
11825  SourceLocation EndLoc);
11826  /// Called on well-formed 'order' clause.
11829  SourceLocation StartLoc,
11830  SourceLocation LParenLoc,
11831  SourceLocation MLoc, SourceLocation KindLoc,
11832  SourceLocation EndLoc);
11833  /// Called on well-formed 'update' clause.
11835  SourceLocation KindLoc,
11836  SourceLocation StartLoc,
11837  SourceLocation LParenLoc,
11838  SourceLocation EndLoc);
11839 
11842  SourceLocation StartLoc, SourceLocation LParenLoc,
11843  ArrayRef<SourceLocation> ArgumentsLoc, SourceLocation DelimLoc,
11844  SourceLocation EndLoc);
11845  /// Called on well-formed 'schedule' clause.
11848  OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc,
11849  SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc,
11850  SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc);
11851 
11853  SourceLocation EndLoc);
11854  /// Called on well-formed 'nowait' clause.
11856  SourceLocation EndLoc);
11857  /// Called on well-formed 'untied' clause.
11859  SourceLocation EndLoc);
11860  /// Called on well-formed 'mergeable' clause.
11862  SourceLocation EndLoc);
11863  /// Called on well-formed 'read' clause.
11865  SourceLocation EndLoc);
11866  /// Called on well-formed 'write' clause.
11868  SourceLocation EndLoc);
11869  /// Called on well-formed 'update' clause.
11871  SourceLocation EndLoc);
11872  /// Called on well-formed 'capture' clause.
11874  SourceLocation EndLoc);
11875  /// Called on well-formed 'compare' clause.
11877  SourceLocation EndLoc);
11878  /// Called on well-formed 'seq_cst' clause.
11880  SourceLocation EndLoc);
11881  /// Called on well-formed 'acq_rel' clause.
11883  SourceLocation EndLoc);
11884  /// Called on well-formed 'acquire' clause.
11886  SourceLocation EndLoc);
11887  /// Called on well-formed 'release' clause.
11889  SourceLocation EndLoc);
11890  /// Called on well-formed 'relaxed' clause.
11892  SourceLocation EndLoc);
11893 
11894  /// Called on well-formed 'init' clause.
11895  OMPClause *
11896  ActOnOpenMPInitClause(Expr *InteropVar, OMPInteropInfo &InteropInfo,
11897  SourceLocation StartLoc, SourceLocation LParenLoc,
11898  SourceLocation VarLoc, SourceLocation EndLoc);
11899 
11900  /// Called on well-formed 'use' clause.
11901  OMPClause *ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc,
11902  SourceLocation LParenLoc,
11903  SourceLocation VarLoc, SourceLocation EndLoc);
11904 
11905  /// Called on well-formed 'destroy' clause.
11906  OMPClause *ActOnOpenMPDestroyClause(Expr *InteropVar, SourceLocation StartLoc,
11907  SourceLocation LParenLoc,
11908  SourceLocation VarLoc,
11909  SourceLocation EndLoc);
11910  /// Called on well-formed 'novariants' clause.
11912  SourceLocation StartLoc,
11913  SourceLocation LParenLoc,
11914  SourceLocation EndLoc);
11915  /// Called on well-formed 'nocontext' clause.
11917  SourceLocation StartLoc,
11918  SourceLocation LParenLoc,
11919  SourceLocation EndLoc);
11920  /// Called on well-formed 'filter' clause.
11922  SourceLocation LParenLoc,
11923  SourceLocation EndLoc);
11924  /// Called on well-formed 'threads' clause.
11926  SourceLocation EndLoc);
11927  /// Called on well-formed 'simd' clause.
11929  SourceLocation EndLoc);
11930  /// Called on well-formed 'nogroup' clause.
11932  SourceLocation EndLoc);
11933  /// Called on well-formed 'unified_address' clause.
11935  SourceLocation EndLoc);
11936 
11937  /// Called on well-formed 'unified_address' clause.
11939  SourceLocation EndLoc);
11940 
11941  /// Called on well-formed 'reverse_offload' clause.
11943  SourceLocation EndLoc);
11944 
11945  /// Called on well-formed 'dynamic_allocators' clause.
11947  SourceLocation EndLoc);
11948 
11949  /// Called on well-formed 'atomic_default_mem_order' clause.
11952  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
11953 
11954  /// Called on well-formed 'at' clause.
11956  SourceLocation KindLoc,
11957  SourceLocation StartLoc,
11958  SourceLocation LParenLoc,
11959  SourceLocation EndLoc);
11960 
11961  /// Called on well-formed 'severity' clause.
11963  SourceLocation KindLoc,
11964  SourceLocation StartLoc,
11965  SourceLocation LParenLoc,
11966  SourceLocation EndLoc);
11967 
11968  /// Called on well-formed 'message' clause.
11969  /// passing string for message.
11971  SourceLocation LParenLoc,
11972  SourceLocation EndLoc);
11973 
11974  /// Data used for processing a list of variables in OpenMP clauses.
11975  struct OpenMPVarListDataTy final {
11977  Expr *IteratorExpr = nullptr;
11982  int ExtraModifier = -1; ///< Additional modifier for linear, map, depend or
11983  ///< lastprivate clause.
11991  bool IsMapTypeImplicit = false;
11994  };
11995 
11997  ArrayRef<Expr *> Vars,
11998  const OMPVarListLocTy &Locs,
12000  /// Called on well-formed 'inclusive' clause.
12002  SourceLocation StartLoc,
12003  SourceLocation LParenLoc,
12004  SourceLocation EndLoc);
12005  /// Called on well-formed 'exclusive' clause.
12007  SourceLocation StartLoc,
12008  SourceLocation LParenLoc,
12009  SourceLocation EndLoc);
12010  /// Called on well-formed 'allocate' clause.
12011  OMPClause *
12012  ActOnOpenMPAllocateClause(Expr *Allocator, ArrayRef<Expr *> VarList,
12013  SourceLocation StartLoc, SourceLocation ColonLoc,
12014  SourceLocation LParenLoc, SourceLocation EndLoc);
12015  /// Called on well-formed 'private' clause.
12017  SourceLocation StartLoc,
12018  SourceLocation LParenLoc,
12019  SourceLocation EndLoc);
12020  /// Called on well-formed 'firstprivate' clause.
12022  SourceLocation StartLoc,
12023  SourceLocation LParenLoc,
12024  SourceLocation EndLoc);
12025  /// Called on well-formed 'lastprivate' clause.
12028  SourceLocation LPKindLoc, SourceLocation ColonLoc,
12029  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
12030  /// Called on well-formed 'shared' clause.
12032  SourceLocation StartLoc,
12033  SourceLocation LParenLoc,
12034  SourceLocation EndLoc);
12035  /// Called on well-formed 'reduction' clause.
12038  SourceLocation StartLoc, SourceLocation LParenLoc,
12039  SourceLocation ModifierLoc, SourceLocation ColonLoc,
12040  SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec,
12041  const DeclarationNameInfo &ReductionId,
12042  ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
12043  /// Called on well-formed 'task_reduction' clause.
12045  ArrayRef<Expr *> VarList, SourceLocation StartLoc,
12046  SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
12047  CXXScopeSpec &ReductionIdScopeSpec,
12048  const DeclarationNameInfo &ReductionId,
12049  ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
12050  /// Called on well-formed 'in_reduction' clause.
12052  ArrayRef<Expr *> VarList, SourceLocation StartLoc,
12053  SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
12054  CXXScopeSpec &ReductionIdScopeSpec,
12055  const DeclarationNameInfo &ReductionId,
12056  ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
12057  /// Called on well-formed 'linear' clause.
12058  OMPClause *
12060  SourceLocation StartLoc, SourceLocation LParenLoc,
12061  OpenMPLinearClauseKind LinKind, SourceLocation LinLoc,
12062  SourceLocation ColonLoc, SourceLocation EndLoc);
12063  /// Called on well-formed 'aligned' clause.
12065  Expr *Alignment,
12066  SourceLocation StartLoc,
12067  SourceLocation LParenLoc,
12068  SourceLocation ColonLoc,
12069  SourceLocation EndLoc);
12070  /// Called on well-formed 'copyin' clause.
12072  SourceLocation StartLoc,
12073  SourceLocation LParenLoc,
12074  SourceLocation EndLoc);
12075  /// Called on well-formed 'copyprivate' clause.
12077  SourceLocation StartLoc,
12078  SourceLocation LParenLoc,
12079  SourceLocation EndLoc);
12080  /// Called on well-formed 'flush' pseudo clause.
12082  SourceLocation StartLoc,
12083  SourceLocation LParenLoc,
12084  SourceLocation EndLoc);
12085  /// Called on well-formed 'depobj' pseudo clause.
12087  SourceLocation LParenLoc,
12088  SourceLocation EndLoc);
12089  /// Called on well-formed 'depend' clause.
12091  Expr *DepModifier,
12092  ArrayRef<Expr *> VarList,
12093  SourceLocation StartLoc,
12094  SourceLocation LParenLoc,
12095  SourceLocation EndLoc);
12096  /// Called on well-formed 'device' clause.
12098  Expr *Device, SourceLocation StartLoc,
12099  SourceLocation LParenLoc,
12100  SourceLocation ModifierLoc,
12101  SourceLocation EndLoc);
12102  /// Called on well-formed 'map' clause.
12104  Expr *IteratorModifier, ArrayRef<OpenMPMapModifierKind> MapTypeModifiers,
12105  ArrayRef<SourceLocation> MapTypeModifiersLoc,
12106  CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId,
12107  OpenMPMapClauseKind MapType, bool IsMapTypeImplicit,
12108  SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef<Expr *> VarList,
12109  const OMPVarListLocTy &Locs, bool NoDiagnose = false,
12110  ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
12111  /// Called on well-formed 'num_teams' clause.
12113  SourceLocation LParenLoc,
12114  SourceLocation EndLoc);
12115  /// Called on well-formed 'thread_limit' clause.
12117  SourceLocation StartLoc,
12118  SourceLocation LParenLoc,
12119  SourceLocation EndLoc);
12120  /// Called on well-formed 'priority' clause.
12122  SourceLocation LParenLoc,
12123  SourceLocation EndLoc);
12124  /// Called on well-formed 'dist_schedule' clause.
12127  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc,
12128  SourceLocation CommaLoc, SourceLocation EndLoc);
12129  /// Called on well-formed 'defaultmap' clause.
12132  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc,
12133  SourceLocation KindLoc, SourceLocation EndLoc);
12134  /// Called on well-formed 'to' clause.
12135  OMPClause *
12137  ArrayRef<SourceLocation> MotionModifiersLoc,
12138  CXXScopeSpec &MapperIdScopeSpec,
12139  DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
12140  ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
12141  ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
12142  /// Called on well-formed 'from' clause.
12143  OMPClause *
12145  ArrayRef<SourceLocation> MotionModifiersLoc,
12146  CXXScopeSpec &MapperIdScopeSpec,
12147  DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
12148  ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
12149  ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
12150  /// Called on well-formed 'use_device_ptr' clause.
12152  const OMPVarListLocTy &Locs);
12153  /// Called on well-formed 'use_device_addr' clause.
12155  const OMPVarListLocTy &Locs);
12156  /// Called on well-formed 'is_device_ptr' clause.
12158  const OMPVarListLocTy &Locs);
12159  /// Called on well-formed 'has_device_addr' clause.
12161  const OMPVarListLocTy &Locs);
12162  /// Called on well-formed 'nontemporal' clause.
12164  SourceLocation StartLoc,
12165  SourceLocation LParenLoc,
12166  SourceLocation EndLoc);
12167 
12168  /// Data for list of allocators.
12170  /// Allocator.
12171  Expr *Allocator = nullptr;
12172  /// Allocator traits.
12173  Expr *AllocatorTraits = nullptr;
12174  /// Locations of '(' and ')' symbols.
12176  };
12177  /// Called on well-formed 'uses_allocators' clause.
12179  SourceLocation LParenLoc,
12180  SourceLocation EndLoc,
12182  /// Called on well-formed 'affinity' clause.
12184  SourceLocation LParenLoc,
12185  SourceLocation ColonLoc,
12186  SourceLocation EndLoc, Expr *Modifier,
12187  ArrayRef<Expr *> Locators);
12188  /// Called on a well-formed 'bind' clause.
12190  SourceLocation KindLoc,
12191  SourceLocation StartLoc,
12192  SourceLocation LParenLoc,
12193  SourceLocation EndLoc);
12194 
12195  /// Called on a well-formed 'ompx_dyn_cgroup_mem' clause.
12197  SourceLocation LParenLoc,
12198  SourceLocation EndLoc);
12199 
12200  /// The kind of conversion being performed.
12202  /// An implicit conversion.
12204  /// A C-style cast.
12206  /// A functional-style cast.
12208  /// A cast other than a C-style cast.
12210  /// A conversion for an operand of a builtin overloaded operator.
12212  };
12213 
12214  static bool isCast(CheckedConversionKind CCK) {
12215  return CCK == CCK_CStyleCast || CCK == CCK_FunctionalCast ||
12216  CCK == CCK_OtherCast;
12217  }
12218 
12219  /// ImpCastExprToType - If Expr is not of type 'Type', insert an implicit
12220  /// cast. If there is already an implicit cast, merge into the existing one.
12221  /// If isLvalue, the result of the cast is an lvalue.
12222  ExprResult
12225  const CXXCastPath *BasePath = nullptr,
12227 
12228  /// ScalarTypeToBooleanCastKind - Returns the cast kind corresponding
12229  /// to the conversion from scalar type ScalarTy to the Boolean type.
12231 
12232  /// IgnoredValueConversions - Given that an expression's result is
12233  /// syntactically ignored, perform any conversions that are
12234  /// required.
12236 
12237  // UsualUnaryConversions - promotes integers (C99 6.3.1.1p2) and converts
12238  // functions and arrays to their respective pointers (C99 6.3.2.1).
12240 
12241  /// CallExprUnaryConversions - a special case of an unary conversion
12242  /// performed on a function designator of a call expression.
12244 
12245  // DefaultFunctionArrayConversion - converts functions and arrays
12246  // to their respective pointers (C99 6.3.2.1).
12247  ExprResult DefaultFunctionArrayConversion(Expr *E, bool Diagnose = true);
12248 
12249  // DefaultFunctionArrayLvalueConversion - converts functions and
12250  // arrays to their respective pointers and performs the
12251  // lvalue-to-rvalue conversion.
12253  bool Diagnose = true);
12254 
12255  // DefaultLvalueConversion - performs lvalue-to-rvalue conversion on
12256  // the operand. This function is a no-op if the operand has a function type
12257  // or an array type.
12259 
12260  // DefaultArgumentPromotion (C99 6.5.2.2p6). Used for function calls that
12261  // do not have a prototype. Integer promotions are performed on each
12262  // argument, and arguments that have type float are promoted to double.
12264 
12265  /// If \p E is a prvalue denoting an unmaterialized temporary, materialize
12266  /// it as an xvalue. In C++98, the result will still be a prvalue, because
12267  /// we don't have xvalues there.
12269 
12270  // Used for emitting the right warning by DefaultVariadicArgumentPromotion
12277  };
12278 
12280  const FunctionProtoType *Proto,
12281  Expr *Fn);
12282 
12283  // Used for determining in which context a type is allowed to be passed to a
12284  // vararg function.
12285  enum VarArgKind {
12291  };
12292 
12293  // Determines which VarArgKind fits an expression.
12295 
12296  /// Check to see if the given expression is a valid argument to a variadic
12297  /// function, issuing a diagnostic if not.
12298  void checkVariadicArgument(const Expr *E, VariadicCallType CT);
12299 
12300  /// Check whether the given statement can have musttail applied to it,
12301  /// issuing a diagnostic and returning false if not. In the success case,
12302  /// the statement is rewritten to remove implicit nodes from the return
12303  /// value.
12304  bool checkAndRewriteMustTailAttr(Stmt *St, const Attr &MTA);
12305 
12306 private:
12307  /// Check whether the given statement can have musttail applied to it,
12308  /// issuing a diagnostic and returning false if not.
12309  bool checkMustTailAttr(const Stmt *St, const Attr &MTA);
12310 
12311 public:
12312  /// Check to see if a given expression could have '.c_str()' called on it.
12313  bool hasCStrMethod(const Expr *E);
12314 
12315  /// GatherArgumentsForCall - Collector argument expressions for various
12316  /// form of call prototypes.
12317  bool GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl,
12318  const FunctionProtoType *Proto,
12319  unsigned FirstParam, ArrayRef<Expr *> Args,
12320  SmallVectorImpl<Expr *> &AllArgs,
12322  bool AllowExplicit = false,
12323  bool IsListInitialization = false);
12324 
12325  // DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but
12326  // will create a runtime trap if the resulting type is not a POD type.
12328  FunctionDecl *FDecl);
12329 
12330  /// Context in which we're performing a usual arithmetic conversion.
12332  /// An arithmetic operation.
12334  /// A bitwise operation.
12336  /// A comparison.
12338  /// A conditional (?:) operator.
12340  /// A compound assignment expression.
12342  };
12343 
12344  // UsualArithmeticConversions - performs the UsualUnaryConversions on it's
12345  // operands and then handles various conversions that are common to binary
12346  // operators (C99 6.3.1.8). If both operands aren't arithmetic, this
12347  // routine returns the first non-arithmetic type found. The client is
12348  // responsible for emitting appropriate error diagnostics.
12350  SourceLocation Loc, ArithConvKind ACK);
12351 
12352  /// AssignConvertType - All of the 'assignment' semantic checks return this
12353  /// enum to indicate whether the assignment was allowed. These checks are
12354  /// done for simple assignments, as well as initialization, return from
12355  /// function, argument passing, etc. The query is phrased in terms of a
12356  /// source and destination type.
12358  /// Compatible - the types are compatible according to the standard.
12360 
12361  /// PointerToInt - The assignment converts a pointer to an int, which we
12362  /// accept as an extension.
12364 
12365  /// IntToPointer - The assignment converts an int to a pointer, which we
12366  /// accept as an extension.
12368 
12369  /// FunctionVoidPointer - The assignment is between a function pointer and
12370  /// void*, which the standard doesn't allow, but we accept as an extension.
12372 
12373  /// IncompatiblePointer - The assignment is between two pointers types that
12374  /// are not compatible, but we accept them as an extension.
12376 
12377  /// IncompatibleFunctionPointer - The assignment is between two function
12378  /// pointers types that are not compatible, but we accept them as an
12379  /// extension.
12381 
12382  /// IncompatibleFunctionPointerStrict - The assignment is between two
12383  /// function pointer types that are not identical, but are compatible,
12384  /// unless compiled with -fsanitize=cfi, in which case the type mismatch
12385  /// may trip an indirect call runtime check.
12387 
12388  /// IncompatiblePointerSign - The assignment is between two pointers types
12389  /// which point to integers which have a different sign, but are otherwise
12390  /// identical. This is a subset of the above, but broken out because it's by
12391  /// far the most common case of incompatible pointers.
12393 
12394  /// CompatiblePointerDiscardsQualifiers - The assignment discards
12395  /// c/v/r qualifiers, which we accept as an extension.
12397 
12398  /// IncompatiblePointerDiscardsQualifiers - The assignment
12399  /// discards qualifiers that we don't permit to be discarded,
12400  /// like address spaces.
12402 
12403  /// IncompatibleNestedPointerAddressSpaceMismatch - The assignment
12404  /// changes address spaces in nested pointer types which is not allowed.
12405  /// For instance, converting __private int ** to __generic int ** is
12406  /// illegal even though __private could be converted to __generic.
12408 
12409  /// IncompatibleNestedPointerQualifiers - The assignment is between two
12410  /// nested pointer types, and the qualifiers other than the first two
12411  /// levels differ e.g. char ** -> const char **, but we accept them as an
12412  /// extension.
12414 
12415  /// IncompatibleVectors - The assignment is between two vector types that
12416  /// have the same size, which we accept as an extension.
12418 
12419  /// IntToBlockPointer - The assignment converts an int to a block
12420  /// pointer. We disallow this.
12422 
12423  /// IncompatibleBlockPointer - The assignment is between two block
12424  /// pointers types that are not compatible.
12426 
12427  /// IncompatibleObjCQualifiedId - The assignment is between a qualified
12428  /// id type and something else (that is incompatible with it). For example,
12429  /// "id <XXX>" = "Foo *", where "Foo *" doesn't implement the XXX protocol.
12431 
12432  /// IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an
12433  /// object with __weak qualifier.
12435 
12436  /// Incompatible - We reject this conversion outright, it is invalid to
12437  /// represent it in the AST.
12439  };
12440 
12441  /// DiagnoseAssignmentResult - Emit a diagnostic, if required, for the
12442  /// assignment conversion type specified by ConvTy. This returns true if the
12443  /// conversion was invalid or false if the conversion was accepted.
12445  SourceLocation Loc,
12446  QualType DstType, QualType SrcType,
12447  Expr *SrcExpr, AssignmentAction Action,
12448  bool *Complained = nullptr);
12449 
12450  /// IsValueInFlagEnum - Determine if a value is allowed as part of a flag
12451  /// enum. If AllowMask is true, then we also allow the complement of a valid
12452  /// value, to be used as a mask.
12453  bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val,
12454  bool AllowMask) const;
12455 
12456  /// DiagnoseAssignmentEnum - Warn if assignment to enum is a constant
12457  /// integer not in the range of enum values.
12458  void DiagnoseAssignmentEnum(QualType DstType, QualType SrcType,
12459  Expr *SrcExpr);
12460 
12461  /// CheckAssignmentConstraints - Perform type checking for assignment,
12462  /// argument passing, variable initialization, and function return values.
12463  /// C99 6.5.16.
12465  QualType LHSType,
12466  QualType RHSType);
12467 
12468  /// Check assignment constraints and optionally prepare for a conversion of
12469  /// the RHS to the LHS type. The conversion is prepared for if ConvertRHS
12470  /// is true.
12472  ExprResult &RHS,
12473  CastKind &Kind,
12474  bool ConvertRHS = true);
12475 
12476  /// Check assignment constraints for an assignment of RHS to LHSType.
12477  ///
12478  /// \param LHSType The destination type for the assignment.
12479  /// \param RHS The source expression for the assignment.
12480  /// \param Diagnose If \c true, diagnostics may be produced when checking
12481  /// for assignability. If a diagnostic is produced, \p RHS will be
12482  /// set to ExprError(). Note that this function may still return
12483  /// without producing a diagnostic, even for an invalid assignment.
12484  /// \param DiagnoseCFAudited If \c true, the target is a function parameter
12485  /// in an audited Core Foundation API and does not need to be checked
12486  /// for ARC retain issues.
12487  /// \param ConvertRHS If \c true, \p RHS will be updated to model the
12488  /// conversions necessary to perform the assignment. If \c false,
12489  /// \p Diagnose must also be \c false.
12491  QualType LHSType, ExprResult &RHS, bool Diagnose = true,
12492  bool DiagnoseCFAudited = false, bool ConvertRHS = true);
12493 
12494  // If the lhs type is a transparent union, check whether we
12495  // can initialize the transparent union with the given expression.
12497  ExprResult &RHS);
12498 
12500 
12501  bool CheckExceptionSpecCompatibility(Expr *From, QualType ToType);
12502 
12504  AssignmentAction Action,
12505  bool AllowExplicit = false);
12507  const ImplicitConversionSequence& ICS,
12508  AssignmentAction Action,
12512  const StandardConversionSequence& SCS,
12513  AssignmentAction Action,
12514  CheckedConversionKind CCK);
12515 
12517  Expr *E, QualType Ty, ExprValueKind VK = VK_PRValue,
12519 
12520  /// the following "Check" methods will return a valid/converted QualType
12521  /// or a null QualType (indicating an error diagnostic was issued).
12522 
12523  /// type checking binary operators (subroutines of CreateBuiltinBinOp).
12525  ExprResult &RHS);
12527  ExprResult &RHS);
12529  ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK,
12530  SourceLocation OpLoc, bool isIndirect);
12532  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign,
12533  bool IsDivide);
12534  QualType CheckRemainderOperands( // C99 6.5.5
12535  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12536  bool IsCompAssign = false);
12537  QualType CheckAdditionOperands( // C99 6.5.6
12538  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12539  BinaryOperatorKind Opc, QualType* CompLHSTy = nullptr);
12540  QualType CheckSubtractionOperands( // C99 6.5.6
12541  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12542  QualType* CompLHSTy = nullptr);
12543  QualType CheckShiftOperands( // C99 6.5.7
12544  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12545  BinaryOperatorKind Opc, bool IsCompAssign = false);
12547  QualType CheckCompareOperands( // C99 6.5.8/9
12548  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12549  BinaryOperatorKind Opc);
12550  QualType CheckBitwiseOperands( // C99 6.5.[10...12]
12551  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12552  BinaryOperatorKind Opc);
12553  QualType CheckLogicalOperands( // C99 6.5.[13,14]
12554  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12555  BinaryOperatorKind Opc);
12556  // CheckAssignmentOperands is used for both simple and compound assignment.
12557  // For simple assignment, pass both expressions and a null converted type.
12558  // For compound assignment, pass both expressions and the converted type.
12559  QualType CheckAssignmentOperands( // C99 6.5.16.[1,2]
12560  Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType,
12561  BinaryOperatorKind Opc);
12562 
12567  Expr *LHS, Expr *RHS);
12570 
12571  QualType CheckConditionalOperands( // C99 6.5.15
12572  ExprResult &Cond, ExprResult &LHS, ExprResult &RHS,
12573  ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc);
12575  ExprResult &cond, ExprResult &lhs, ExprResult &rhs,
12576  ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc);
12578  ExprResult &RHS,
12579  SourceLocation QuestionLoc);
12580 
12582  ExprResult &LHS, ExprResult &RHS,
12583  SourceLocation QuestionLoc);
12585  bool ConvertArgs = true);
12587  ExprResult &E1, ExprResult &E2,
12588  bool ConvertArgs = true) {
12589  Expr *E1Tmp = E1.get(), *E2Tmp = E2.get();
12590  QualType Composite =
12591  FindCompositePointerType(Loc, E1Tmp, E2Tmp, ConvertArgs);
12592  E1 = E1Tmp;
12593  E2 = E2Tmp;
12594  return Composite;
12595  }
12596 
12598  SourceLocation QuestionLoc);
12599 
12600  bool DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
12601  SourceLocation QuestionLoc);
12602 
12605  bool IsEqual, SourceRange Range);
12606 
12607  /// type checking for vector binary operators.
12609  SourceLocation Loc, bool IsCompAssign,
12610  bool AllowBothBool, bool AllowBoolConversion,
12611  bool AllowBoolOperation, bool ReportInvalid);
12615  SourceLocation Loc,
12616  BinaryOperatorKind Opc);
12618  SourceLocation Loc,
12619  BinaryOperatorKind Opc);
12621  SourceLocation Loc);
12622 
12623  // type checking for sizeless vector binary operators.
12625  SourceLocation Loc, bool IsCompAssign,
12626  ArithConvKind OperationKind);
12627 
12628  /// Type checking for matrix binary operators.
12630  SourceLocation Loc,
12631  bool IsCompAssign);
12633  SourceLocation Loc, bool IsCompAssign);
12634 
12635  bool isValidSveBitcast(QualType srcType, QualType destType);
12636 
12638 
12639  bool areVectorTypesSameSize(QualType srcType, QualType destType);
12640  bool areLaxCompatibleVectorTypes(QualType srcType, QualType destType);
12641  bool isLaxVectorConversion(QualType srcType, QualType destType);
12642  bool areSameVectorElemTypes(QualType srcType, QualType destType);
12643  bool anyAltivecTypes(QualType srcType, QualType destType);
12644 
12645  /// type checking declaration initializers (C99 6.7.8)
12647 
12648  // type checking C++ declaration initializers (C++ [dcl.init]).
12649 
12650  /// ReferenceCompareResult - Expresses the result of comparing two
12651  /// types (cv1 T1 and cv2 T2) to determine their compatibility for the
12652  /// purposes of initialization by reference (C++ [dcl.init.ref]p4).
12654  /// Ref_Incompatible - The two types are incompatible, so direct
12655  /// reference binding is not possible.
12657  /// Ref_Related - The two types are reference-related, which means
12658  /// that their unqualified forms (T1 and T2) are either the same
12659  /// or T1 is a base class of T2.
12661  /// Ref_Compatible - The two types are reference-compatible.
12663  };
12664 
12665  // Fake up a scoped enumeration that still contextually converts to bool.
12667  /// The conversions that would be performed on an lvalue of type T2 when
12668  /// binding a reference of type T1 to it, as determined when evaluating
12669  /// whether T1 is reference-compatible with T2.
12673  Function = 0x4,
12675  ObjC = 0x10,
12677 
12678  LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/ObjCLifetime)
12679  };
12680  };
12682 
12685  ReferenceConversions *Conv = nullptr);
12686 
12689  ExprValueKind &VK, CXXCastPath &Path);
12690 
12691  /// Force an expression with unknown-type to an expression of the
12692  /// given type.
12694 
12695  /// Type-check an expression that's being passed to an
12696  /// __unknown_anytype parameter.
12698  Expr *result, QualType &paramType);
12699 
12700  // CheckMatrixCast - Check type constraints for matrix casts.
12701  // We allow casting between matrixes of the same dimensions i.e. when they
12702  // have the same number of rows and column. Returns true if the cast is
12703  // invalid.
12704  bool CheckMatrixCast(SourceRange R, QualType DestTy, QualType SrcTy,
12705  CastKind &Kind);
12706 
12707  // CheckVectorCast - check type constraints for vectors.
12708  // Since vectors are an extension, there are no C standard reference for this.
12709  // We allow casting between vectors and integer datatypes of the same size.
12710  // returns true if the cast is invalid
12711  bool CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty,
12712  CastKind &Kind);
12713 
12714  /// Prepare `SplattedExpr` for a vector splat operation, adding
12715  /// implicit casts if necessary.
12716  ExprResult prepareVectorSplat(QualType VectorTy, Expr *SplattedExpr);
12717 
12718  // CheckExtVectorCast - check type constraints for extended vectors.
12719  // Since vectors are an extension, there are no C standard reference for this.
12720  // We allow casting between vectors and integer datatypes of the same size,
12721  // or vectors and the element type of that vector.
12722  // returns the cast expr
12724  CastKind &Kind);
12725 
12727  SourceLocation LParenLoc,
12728  Expr *CastExpr,
12729  SourceLocation RParenLoc);
12730 
12732 
12733  /// Checks for invalid conversions and casts between
12734  /// retainable pointers and other pointer kinds for ARC and Weak.
12736  QualType castType, Expr *&op,
12738  bool Diagnose = true,
12739  bool DiagnoseCFAudited = false,
12740  BinaryOperatorKind Opc = BO_PtrMemD
12741  );
12742 
12744  void diagnoseARCUnbridgedCast(Expr *e);
12745 
12747  QualType ExprType);
12748 
12749  /// checkRetainCycles - Check whether an Objective-C message send
12750  /// might create an obvious retain cycle.
12752  void checkRetainCycles(Expr *receiver, Expr *argument);
12753  void checkRetainCycles(VarDecl *Var, Expr *Init);
12754 
12755  /// checkUnsafeAssigns - Check whether +1 expr is being assigned
12756  /// to weak/__unsafe_unretained type.
12757  bool checkUnsafeAssigns(SourceLocation Loc, QualType LHS, Expr *RHS);
12758 
12759  /// checkUnsafeExprAssigns - Check whether +1 expr is being assigned
12760  /// to weak/__unsafe_unretained expression.
12761  void checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS);
12762 
12763  /// CheckMessageArgumentTypes - Check types in an Obj-C message send.
12764  /// \param Method - May be null.
12765  /// \param [out] ReturnType - The return type of the send.
12766  /// \return true iff there were any incompatible types.
12767  bool CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType,
12768  MultiExprArg Args, Selector Sel,
12769  ArrayRef<SourceLocation> SelectorLocs,
12770  ObjCMethodDecl *Method, bool isClassMessage,
12771  bool isSuperMessage, SourceLocation lbrac,
12772  SourceLocation rbrac, SourceRange RecRange,
12773  QualType &ReturnType, ExprValueKind &VK);
12774 
12775  /// Determine the result of a message send expression based on
12776  /// the type of the receiver, the method expected to receive the message,
12777  /// and the form of the message send.
12778  QualType getMessageSendResultType(const Expr *Receiver, QualType ReceiverType,
12779  ObjCMethodDecl *Method, bool isClassMessage,
12780  bool isSuperMessage);
12781 
12782  /// If the given expression involves a message send to a method
12783  /// with a related result type, emit a note describing what happened.
12784  void EmitRelatedResultTypeNote(const Expr *E);
12785 
12786  /// Given that we had incompatible pointer types in a return
12787  /// statement, check whether we're in a method with a related result
12788  /// type, and if so, emit a note describing what happened.
12790 
12792  Decl *ConditionVar;
12793  FullExprArg Condition;
12794  bool Invalid;
12795  bool HasKnownValue;
12796  bool KnownValue;
12797 
12798  friend class Sema;
12799  ConditionResult(Sema &S, Decl *ConditionVar, FullExprArg Condition,
12800  bool IsConstexpr)
12801  : ConditionVar(ConditionVar), Condition(Condition), Invalid(false),
12802  HasKnownValue(IsConstexpr && Condition.get() &&
12803  !Condition.get()->isValueDependent()),
12804  KnownValue(HasKnownValue &&
12805  !!Condition.get()->EvaluateKnownConstInt(S.Context)) {}
12806  explicit ConditionResult(bool Invalid)
12807  : ConditionVar(nullptr), Condition(nullptr), Invalid(Invalid),
12808  HasKnownValue(false), KnownValue(false) {}
12809 
12810  public:
12812  bool isInvalid() const { return Invalid; }
12813  std::pair<VarDecl *, Expr *> get() const {
12814  return std::make_pair(cast_or_null<VarDecl>(ConditionVar),
12815  Condition.get());
12816  }
12817  std::optional<bool> getKnownValue() const {
12818  if (!HasKnownValue)
12819  return std::nullopt;
12820  return KnownValue;
12821  }
12822  };
12824 
12825  enum class ConditionKind {
12826  Boolean, ///< A boolean condition, from 'if', 'while', 'for', or 'do'.
12827  ConstexprIf, ///< A constant boolean condition from 'if constexpr'.
12828  Switch ///< An integral condition for a 'switch' statement.
12829  };
12832  }
12833 
12834  ConditionResult ActOnCondition(Scope *S, SourceLocation Loc, Expr *SubExpr,
12835  ConditionKind CK, bool MissingOK = false);
12836 
12837  ConditionResult ActOnConditionVariable(Decl *ConditionVar,
12838  SourceLocation StmtLoc,
12839  ConditionKind CK);
12840 
12842 
12844  SourceLocation StmtLoc,
12845  ConditionKind CK);
12847 
12848  /// CheckBooleanCondition - Diagnose problems involving the use of
12849  /// the given expression as a boolean condition (e.g. in an if
12850  /// statement). Also performs the standard function and array
12851  /// decays, possibly changing the input variable.
12852  ///
12853  /// \param Loc - A location associated with the condition, e.g. the
12854  /// 'if' keyword.
12855  /// \return true iff there were any errors
12857  bool IsConstexpr = false);
12858 
12859  /// ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression
12860  /// found in an explicit(bool) specifier.
12862 
12863  /// tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.
12864  /// Returns true if the explicit specifier is now resolved.
12865  bool tryResolveExplicitSpecifier(ExplicitSpecifier &ExplicitSpec);
12866 
12867  /// DiagnoseAssignmentAsCondition - Given that an expression is
12868  /// being used as a boolean condition, warn if it's an assignment.
12870 
12871  /// Redundant parentheses over an equality comparison can indicate
12872  /// that the user intended an assignment used as condition.
12874 
12875  /// CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
12876  ExprResult CheckCXXBooleanCondition(Expr *CondExpr, bool IsConstexpr = false);
12877 
12878  /// ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have
12879  /// the specified width and sign. If an overflow occurs, detect it and emit
12880  /// the specified diagnostic.
12882  unsigned NewWidth, bool NewSign,
12883  SourceLocation Loc, unsigned DiagID);
12884 
12885  /// Checks that the Objective-C declaration is declared in the global scope.
12886  /// Emits an error and marks the declaration as invalid if it's not declared
12887  /// in the global scope.
12888  bool CheckObjCDeclScope(Decl *D);
12889 
12890  /// Abstract base class used for diagnosing integer constant
12891  /// expression violations.
12893  public:
12894  bool Suppress;
12895 
12897 
12898  virtual SemaDiagnosticBuilder
12901  SourceLocation Loc) = 0;
12903  virtual ~VerifyICEDiagnoser() {}
12904  };
12905 
12909  };
12910 
12911  /// VerifyIntegerConstantExpression - Verifies that an expression is an ICE,
12912  /// and reports the appropriate diagnostics. Returns false on success.
12913  /// Can optionally return the value of the expression.
12915  VerifyICEDiagnoser &Diagnoser,
12916  AllowFoldKind CanFold = NoFold);
12918  unsigned DiagID,
12919  AllowFoldKind CanFold = NoFold);
12921  llvm::APSInt *Result = nullptr,
12922  AllowFoldKind CanFold = NoFold);
12924  AllowFoldKind CanFold = NoFold) {
12925  return VerifyIntegerConstantExpression(E, nullptr, CanFold);
12926  }
12927 
12928  /// VerifyBitField - verifies that a bit field expression is an ICE and has
12929  /// the correct width, and that the field type is valid.
12930  /// Returns false on success.
12932  QualType FieldTy, bool IsMsStruct, Expr *BitWidth);
12933 
12934 private:
12935  unsigned ForceCUDAHostDeviceDepth = 0;
12936 
12937 public:
12938  /// Increments our count of the number of times we've seen a pragma forcing
12939  /// functions to be __host__ __device__. So long as this count is greater
12940  /// than zero, all functions encountered will be __host__ __device__.
12941  void PushForceCUDAHostDevice();
12942 
12943  /// Decrements our count of the number of times we've seen a pragma forcing
12944  /// functions to be __host__ __device__. Returns false if the count is 0
12945  /// before incrementing, so you can emit an error.
12946  bool PopForceCUDAHostDevice();
12947 
12948  /// Diagnostics that are emitted only if we discover that the given function
12949  /// must be codegen'ed. Because handling these correctly adds overhead to
12950  /// compilation, this is currently only enabled for CUDA compilations.
12951  llvm::DenseMap<CanonicalDeclPtr<FunctionDecl>,
12952  std::vector<PartialDiagnosticAt>>
12954 
12955  /// A pair of a canonical FunctionDecl and a SourceLocation. When used as the
12956  /// key in a hashtable, both the FD and location are hashed.
12960  };
12961 
12962  /// FunctionDecls and SourceLocations for which CheckCUDACall has emitted a
12963  /// (maybe deferred) "bad call" diagnostic. We use this to avoid emitting the
12964  /// same deferred diag twice.
12966 
12967  /// An inverse call graph, mapping known-emitted functions to one of their
12968  /// known-emitted callers (plus the location of the call).
12969  ///
12970  /// Functions that we can tell a priori must be emitted aren't added to this
12971  /// map.
12972  llvm::DenseMap</* Callee = */ CanonicalDeclPtr<FunctionDecl>,
12973  /* Caller = */ FunctionDeclAndLoc>
12975 
12976  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
12977  /// context is "used as device code".
12978  ///
12979  /// - If CurContext is a __host__ function, does not emit any diagnostics
12980  /// unless \p EmitOnBothSides is true.
12981  /// - If CurContext is a __device__ or __global__ function, emits the
12982  /// diagnostics immediately.
12983  /// - If CurContext is a __host__ __device__ function and we are compiling for
12984  /// the device, creates a diagnostic which is emitted if and when we realize
12985  /// that the function will be codegen'ed.
12986  ///
12987  /// Example usage:
12988  ///
12989  /// // Variable-length arrays are not allowed in CUDA device code.
12990  /// if (CUDADiagIfDeviceCode(Loc, diag::err_cuda_vla) << CurrentCUDATarget())
12991  /// return ExprError();
12992  /// // Otherwise, continue parsing as normal.
12994  unsigned DiagID);
12995 
12996  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
12997  /// context is "used as host code".
12998  ///
12999  /// Same as CUDADiagIfDeviceCode, with "host" and "device" switched.
13001 
13002  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
13003  /// context is "used as device code".
13004  ///
13005  /// - If CurContext is a `declare target` function or it is known that the
13006  /// function is emitted for the device, emits the diagnostics immediately.
13007  /// - If CurContext is a non-`declare target` function and we are compiling
13008  /// for the device, creates a diagnostic which is emitted if and when we
13009  /// realize that the function will be codegen'ed.
13010  ///
13011  /// Example usage:
13012  ///
13013  /// // Variable-length arrays are not allowed in NVPTX device code.
13014  /// if (diagIfOpenMPDeviceCode(Loc, diag::err_vla_unsupported))
13015  /// return ExprError();
13016  /// // Otherwise, continue parsing as normal.
13018  diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD);
13019 
13020  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
13021  /// context is "used as host code".
13022  ///
13023  /// - If CurContext is a `declare target` function or it is known that the
13024  /// function is emitted for the host, emits the diagnostics immediately.
13025  /// - If CurContext is a non-host function, just ignore it.
13026  ///
13027  /// Example usage:
13028  ///
13029  /// // Variable-length arrays are not allowed in NVPTX device code.
13030  /// if (diagIfOpenMPHostode(Loc, diag::err_vla_unsupported))
13031  /// return ExprError();
13032  /// // Otherwise, continue parsing as normal.
13034  unsigned DiagID, FunctionDecl *FD);
13035 
13036  SemaDiagnosticBuilder targetDiag(SourceLocation Loc, unsigned DiagID,
13037  FunctionDecl *FD = nullptr);
13039  const PartialDiagnostic &PD,
13040  FunctionDecl *FD = nullptr) {
13041  return targetDiag(Loc, PD.getDiagID(), FD) << PD;
13042  }
13043 
13044  /// Check if the type is allowed to be used for the current target.
13046  ValueDecl *D = nullptr);
13047 
13054  };
13055 
13056  /// Determines whether the given function is a CUDA device/host/kernel/etc.
13057  /// function.
13058  ///
13059  /// Use this rather than examining the function's attributes yourself -- you
13060  /// will get it wrong. Returns CFT_Host if D is null.
13062  bool IgnoreImplicitHDAttr = false);
13064 
13066  CVT_Device, /// Emitted on device side with a shadow variable on host side
13067  CVT_Host, /// Emitted on host side only
13068  CVT_Both, /// Emitted on both sides with different addresses
13069  CVT_Unified, /// Emitted as a unified address, e.g. managed variables
13070  };
13071  /// Determines whether the given variable is emitted on host or device side.
13073 
13074  /// Gets the CUDA target for the current context.
13076  return IdentifyCUDATarget(dyn_cast<FunctionDecl>(CurContext));
13077  }
13078 
13079  static bool isCUDAImplicitHostDeviceFunction(const FunctionDecl *D);
13080 
13081  // CUDA function call preference. Must be ordered numerically from
13082  // worst to best.
13084  CFP_Never, // Invalid caller/callee combination.
13085  CFP_WrongSide, // Calls from host-device to host or device
13086  // function that do not match current compilation
13087  // mode.
13088  CFP_HostDevice, // Any calls to host/device functions.
13089  CFP_SameSide, // Calls from host-device to host or device
13090  // function matching current compilation mode.
13091  CFP_Native, // host-to-host or device-to-device calls.
13092  };
13093 
13094  /// Identifies relative preference of a given Caller/Callee
13095  /// combination, based on their host/device attributes.
13096  /// \param Caller function which needs address of \p Callee.
13097  /// nullptr in case of global context.
13098  /// \param Callee target function
13099  ///
13100  /// \returns preference value for particular Caller/Callee combination.
13102  const FunctionDecl *Callee);
13103 
13104  /// Determines whether Caller may invoke Callee, based on their CUDA
13105  /// host/device attributes. Returns false if the call is not allowed.
13106  ///
13107  /// Note: Will return true for CFP_WrongSide calls. These may appear in
13108  /// semantically correct CUDA programs, but only if they're never codegen'ed.
13109  bool IsAllowedCUDACall(const FunctionDecl *Caller,
13110  const FunctionDecl *Callee) {
13111  return IdentifyCUDAPreference(Caller, Callee) != CFP_Never;
13112  }
13113 
13114  /// May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD,
13115  /// depending on FD and the current compilation settings.
13117  const LookupResult &Previous);
13118 
13119  /// May add implicit CUDAConstantAttr attribute to VD, depending on VD
13120  /// and current compilation settings.
13122 
13123 public:
13124  /// Check whether we're allowed to call Callee from the current context.
13125  ///
13126  /// - If the call is never allowed in a semantically-correct program
13127  /// (CFP_Never), emits an error and returns false.
13128  ///
13129  /// - If the call is allowed in semantically-correct programs, but only if
13130  /// it's never codegen'ed (CFP_WrongSide), creates a deferred diagnostic to
13131  /// be emitted if and when the caller is codegen'ed, and returns true.
13132  ///
13133  /// Will only create deferred diagnostics for a given SourceLocation once,
13134  /// so you can safely call this multiple times without generating duplicate
13135  /// deferred errors.
13136  ///
13137  /// - Otherwise, returns true without emitting any diagnostics.
13138  bool CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee);
13139 
13141 
13142  /// Set __device__ or __host__ __device__ attributes on the given lambda
13143  /// operator() method.
13144  ///
13145  /// CUDA lambdas by default is host device function unless it has explicit
13146  /// host or device attribute.
13147  void CUDASetLambdaAttrs(CXXMethodDecl *Method);
13148 
13149  /// Finds a function in \p Matches with highest calling priority
13150  /// from \p Caller context and erases all functions with lower
13151  /// calling priority.
13153  const FunctionDecl *Caller,
13154  SmallVectorImpl<std::pair<DeclAccessPair, FunctionDecl *>> &Matches);
13155 
13156  /// Given a implicit special member, infer its CUDA target from the
13157  /// calls it needs to make to underlying base/field special members.
13158  /// \param ClassDecl the class for which the member is being created.
13159  /// \param CSM the kind of special member.
13160  /// \param MemberDecl the special member itself.
13161  /// \param ConstRHS true if this is a copy operation with a const object on
13162  /// its RHS.
13163  /// \param Diagnose true if this call should emit diagnostics.
13164  /// \return true if there was an error inferring.
13165  /// The result of this call is implicit CUDA target attribute(s) attached to
13166  /// the member declaration.
13168  CXXSpecialMember CSM,
13169  CXXMethodDecl *MemberDecl,
13170  bool ConstRHS,
13171  bool Diagnose);
13172 
13173  /// \return true if \p CD can be considered empty according to CUDA
13174  /// (E.2.3.1 in CUDA 7.5 Programming guide).
13177 
13178  // \brief Checks that initializers of \p Var satisfy CUDA restrictions. In
13179  // case of error emits appropriate diagnostic and invalidates \p Var.
13180  //
13181  // \details CUDA allows only empty constructors as initializers for global
13182  // variables (see E.2.3.1, CUDA 7.5). The same restriction also applies to all
13183  // __shared__ variables whether they are local or not (they all are implicitly
13184  // static in CUDA). One exception is that CUDA allows constant initializers
13185  // for __constant__ and __device__ variables.
13187 
13188  /// Check whether NewFD is a valid overload for CUDA. Emits
13189  /// diagnostics and invalidates NewFD if not.
13191  const LookupResult &Previous);
13192  /// Copies target attributes from the template TD to the function FD.
13194 
13195  /// Returns the name of the launch configuration function. This is the name
13196  /// of the function that will be called to configure kernel call, with the
13197  /// parameters specified via <<<>>>.
13199 
13200  /// \name Code completion
13201  //@{
13202  /// Describes the context in which code completion occurs.
13204  /// Code completion occurs at top-level or namespace context.
13206  /// Code completion occurs within a class, struct, or union.
13208  /// Code completion occurs within an Objective-C interface, protocol,
13209  /// or category.
13211  /// Code completion occurs within an Objective-C implementation or
13212  /// category implementation
13214  /// Code completion occurs within the list of instance variables
13215  /// in an Objective-C interface, protocol, category, or implementation.
13217  /// Code completion occurs following one or more template
13218  /// headers.
13220  /// Code completion occurs following one or more template
13221  /// headers within a class.
13223  /// Code completion occurs within an expression.
13225  /// Code completion occurs within a statement, which may
13226  /// also be an expression or a declaration.
13228  /// Code completion occurs at the beginning of the
13229  /// initialization statement (or expression) in a for loop.
13231  /// Code completion occurs within the condition of an if,
13232  /// while, switch, or for statement.
13234  /// Code completion occurs within the body of a function on a
13235  /// recovery path, where we do not have a specific handle on our position
13236  /// in the grammar.
13238  /// Code completion occurs where only a type is permitted.
13240  /// Code completion occurs in a parenthesized expression, which
13241  /// might also be a type cast.
13243  /// Code completion occurs within a sequence of declaration
13244  /// specifiers within a function, method, or block.
13246  };
13247 
13250  ParserCompletionContext CompletionContext);
13251  void CodeCompleteDeclSpec(Scope *S, DeclSpec &DS,
13252  bool AllowNonIdentifiers,
13253  bool AllowNestedNameSpecifiers);
13254 
13255  struct CodeCompleteExpressionData;
13256  void CodeCompleteExpression(Scope *S,
13257  const CodeCompleteExpressionData &Data);
13258  void CodeCompleteExpression(Scope *S, QualType PreferredType,
13259  bool IsParenthesized = false);
13260  void CodeCompleteMemberReferenceExpr(Scope *S, Expr *Base, Expr *OtherOpBase,
13261  SourceLocation OpLoc, bool IsArrow,
13262  bool IsBaseExprStatement,
13263  QualType PreferredType);
13265  QualType PreferredType);
13266  void CodeCompleteTag(Scope *S, unsigned TagSpec);
13269  const VirtSpecifiers *VS = nullptr);
13271  void CodeCompleteCase(Scope *S);
13272  enum class AttributeCompletion {
13273  Attribute,
13274  Scope,
13275  None,
13276  };
13277  void CodeCompleteAttribute(
13280  const IdentifierInfo *Scope = nullptr);
13281  /// Determines the preferred type of the current function argument, by
13282  /// examining the signatures of all possible overloads.
13283  /// Returns null if unknown or ambiguous, or if code completion is off.
13284  ///
13285  /// If the code completion point has been reached, also reports the function
13286  /// signatures that were considered.
13287  ///
13288  /// FIXME: rename to GuessCallArgumentType to reduce confusion.
13290  SourceLocation OpenParLoc);
13292  ArrayRef<Expr *> Args,
13293  SourceLocation OpenParLoc,
13294  bool Braced);
13296  Decl *ConstructorDecl, CXXScopeSpec SS, ParsedType TemplateTypeTy,
13297  ArrayRef<Expr *> ArgExprs, IdentifierInfo *II, SourceLocation OpenParLoc,
13298  bool Braced);
13301  void CodeCompleteInitializer(Scope *S, Decl *D);
13302  /// Trigger code completion for a record of \p BaseType. \p InitExprs are
13303  /// expressions in the initializer list seen so far and \p D is the current
13304  /// Designation being parsed.
13305  void CodeCompleteDesignator(const QualType BaseType,
13306  llvm::ArrayRef<Expr *> InitExprs,
13307  const Designation &D);
13308  void CodeCompleteAfterIf(Scope *S, bool IsBracedThen);
13309 
13310  void CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS, bool EnteringContext,
13311  bool IsUsingDeclaration, QualType BaseType,
13312  QualType PreferredType);
13313  void CodeCompleteUsing(Scope *S);
13319  Decl *Constructor,
13320  ArrayRef<CXXCtorInitializer *> Initializers);
13321 
13323  bool AfterAmpersand);
13325 
13334  bool IsParameter);
13337  ArrayRef<IdentifierInfo *> SelIdents,
13338  bool AtArgumentExpression);
13339  void CodeCompleteObjCClassMessage(Scope *S, ParsedType Receiver,
13340  ArrayRef<IdentifierInfo *> SelIdents,
13341  bool AtArgumentExpression,
13342  bool IsSuper = false);
13343  void CodeCompleteObjCInstanceMessage(Scope *S, Expr *Receiver,
13344  ArrayRef<IdentifierInfo *> SelIdents,
13345  bool AtArgumentExpression,
13346  ObjCInterfaceDecl *Super = nullptr);
13348  DeclGroupPtrTy IterationVar);
13350  ArrayRef<IdentifierInfo *> SelIdents);
13352  ArrayRef<IdentifierLocPair> Protocols);
13356  IdentifierInfo *ClassName,
13357  SourceLocation ClassNameLoc);
13360  IdentifierInfo *ClassName,
13361  SourceLocation ClassNameLoc);
13363  IdentifierInfo *ClassName,
13364  SourceLocation ClassNameLoc);
13367  IdentifierInfo *PropertyName);
13369  std::optional<bool> IsInstanceMethod,
13370  ParsedType ReturnType);
13372  bool IsInstanceMethod,
13373  bool AtParameterName,
13374  ParsedType ReturnType,
13375  ArrayRef<IdentifierInfo *> SelIdents);
13377  SourceLocation ClassNameLoc,
13378  bool IsBaseExprStatement);
13379  void CodeCompletePreprocessorDirective(bool InConditional);
13381  void CodeCompletePreprocessorMacroName(bool IsDefinition);
13384  IdentifierInfo *Macro,
13386  unsigned Argument);
13387  void CodeCompleteIncludedFile(llvm::StringRef Dir, bool IsAngled);
13391  CodeCompletionTUInfo &CCTUInfo,
13393  //@}
13394 
13395  //===--------------------------------------------------------------------===//
13396  // Extra semantic analysis beyond the C type system
13397 
13398 public:
13400  unsigned ByteNo) const;
13401 
13403  FAPK_Fixed, // values to format are fixed (no C-style variadic arguments)
13404  FAPK_Variadic, // values to format are passed as variadic arguments
13405  FAPK_VAList, // values to format are passed in a va_list
13406  };
13407 
13408  // Used to grab the relevant information from a FormatAttr and a
13409  // FunctionDeclaration.
13411  unsigned FormatIdx;
13412  unsigned FirstDataArg;
13414  };
13415 
13416  static bool getFormatStringInfo(const FormatAttr *Format, bool IsCXXMember,
13417  bool IsVariadic, FormatStringInfo *FSI);
13418 
13419 private:
13420  void CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
13421  const ArraySubscriptExpr *ASE = nullptr,
13422  bool AllowOnePastEnd = true, bool IndexNegated = false);
13423  void CheckArrayAccess(const Expr *E);
13424 
13425  bool CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
13426  const FunctionProtoType *Proto);
13427  bool CheckObjCMethodCall(ObjCMethodDecl *Method, SourceLocation loc,
13428  ArrayRef<const Expr *> Args);
13429  bool CheckPointerCall(NamedDecl *NDecl, CallExpr *TheCall,
13430  const FunctionProtoType *Proto);
13431  bool CheckOtherCall(CallExpr *TheCall, const FunctionProtoType *Proto);
13432  void CheckConstructorCall(FunctionDecl *FDecl, QualType ThisType,
13434  const FunctionProtoType *Proto, SourceLocation Loc);
13435 
13436  void checkAIXMemberAlignment(SourceLocation Loc, const Expr *Arg);
13437 
13438  void CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl,
13439  StringRef ParamName, QualType ArgTy, QualType ParamTy);
13440 
13441  void checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
13442  const Expr *ThisArg, ArrayRef<const Expr *> Args,
13443  bool IsMemberFunction, SourceLocation Loc, SourceRange Range,
13444  VariadicCallType CallType);
13445 
13446  bool CheckObjCString(Expr *Arg);
13447  ExprResult CheckOSLogFormatStringArg(Expr *Arg);
13448 
13449  ExprResult CheckBuiltinFunctionCall(FunctionDecl *FDecl,
13450  unsigned BuiltinID, CallExpr *TheCall);
13451 
13452  bool CheckTSBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13453  CallExpr *TheCall);
13454 
13455  void checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD, CallExpr *TheCall);
13456 
13457  bool CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall,
13458  unsigned MaxWidth);
13459  bool CheckNeonBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13460  CallExpr *TheCall);
13461  bool CheckMVEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13462  bool CheckSVEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13463  bool CheckCDEBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13464  CallExpr *TheCall);
13465  bool CheckARMCoprocessorImmediate(const TargetInfo &TI, const Expr *CoprocArg,
13466  bool WantCDE);
13467  bool CheckARMBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13468  CallExpr *TheCall);
13469 
13470  bool CheckAArch64BuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13471  CallExpr *TheCall);
13472  bool CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13473  bool CheckHexagonBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13474  bool CheckHexagonBuiltinArgument(unsigned BuiltinID, CallExpr *TheCall);
13475  bool CheckMipsBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13476  CallExpr *TheCall);
13477  bool CheckMipsBuiltinCpu(const TargetInfo &TI, unsigned BuiltinID,
13478  CallExpr *TheCall);
13479  bool CheckMipsBuiltinArgument(unsigned BuiltinID, CallExpr *TheCall);
13480  bool CheckSystemZBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13481  bool CheckX86BuiltinRoundingOrSAE(unsigned BuiltinID, CallExpr *TheCall);
13482  bool CheckX86BuiltinGatherScatterScale(unsigned BuiltinID, CallExpr *TheCall);
13483  bool CheckX86BuiltinTileArguments(unsigned BuiltinID, CallExpr *TheCall);
13484  bool CheckX86BuiltinTileArgumentsRange(CallExpr *TheCall,
13485  ArrayRef<int> ArgNums);
13486  bool CheckX86BuiltinTileDuplicate(CallExpr *TheCall, ArrayRef<int> ArgNums);
13487  bool CheckX86BuiltinTileRangeAndDuplicate(CallExpr *TheCall,
13488  ArrayRef<int> ArgNums);
13489  bool CheckX86BuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13490  CallExpr *TheCall);
13491  bool CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13492  CallExpr *TheCall);
13493  bool CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13494  bool CheckRISCVLMUL(CallExpr *TheCall, unsigned ArgNum);
13495  bool CheckRISCVBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13496  CallExpr *TheCall);
13497  bool CheckLoongArchBuiltinFunctionCall(const TargetInfo &TI,
13498  unsigned BuiltinID, CallExpr *TheCall);
13499 
13500  bool SemaBuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall);
13501  bool SemaBuiltinVAStartARMMicrosoft(CallExpr *Call);
13502  bool SemaBuiltinUnorderedCompare(CallExpr *TheCall);
13503  bool SemaBuiltinFPClassification(CallExpr *TheCall, unsigned NumArgs);
13504  bool SemaBuiltinComplex(CallExpr *TheCall);
13505  bool SemaBuiltinVSX(CallExpr *TheCall);
13506  bool SemaBuiltinOSLogFormat(CallExpr *TheCall);
13507  bool SemaValueIsRunOfOnes(CallExpr *TheCall, unsigned ArgNum);
13508 
13509 public:
13510  // Used by C++ template instantiation.
13513  SourceLocation BuiltinLoc,
13514  SourceLocation RParenLoc);
13515 
13516 private:
13517  bool SemaBuiltinPrefetch(CallExpr *TheCall);
13518  bool SemaBuiltinAllocaWithAlign(CallExpr *TheCall);
13519  bool SemaBuiltinArithmeticFence(CallExpr *TheCall);
13520  bool SemaBuiltinAssume(CallExpr *TheCall);
13521  bool SemaBuiltinAssumeAligned(CallExpr *TheCall);
13522  bool SemaBuiltinLongjmp(CallExpr *TheCall);
13523  bool SemaBuiltinSetjmp(CallExpr *TheCall);
13524  ExprResult SemaBuiltinAtomicOverloaded(ExprResult TheCallResult);
13525  ExprResult SemaBuiltinNontemporalOverloaded(ExprResult TheCallResult);
13526  ExprResult SemaAtomicOpsOverloaded(ExprResult TheCallResult,
13528  ExprResult SemaBuiltinOperatorNewDeleteOverloaded(ExprResult TheCallResult,
13529  bool IsDelete);
13530  bool SemaBuiltinConstantArg(CallExpr *TheCall, int ArgNum,
13531  llvm::APSInt &Result);
13532  bool SemaBuiltinConstantArgRange(CallExpr *TheCall, int ArgNum, int Low,
13533  int High, bool RangeIsError = true);
13534  bool SemaBuiltinConstantArgMultiple(CallExpr *TheCall, int ArgNum,
13535  unsigned Multiple);
13536  bool SemaBuiltinConstantArgPower2(CallExpr *TheCall, int ArgNum);
13537  bool SemaBuiltinConstantArgShiftedByte(CallExpr *TheCall, int ArgNum,
13538  unsigned ArgBits);
13539  bool SemaBuiltinConstantArgShiftedByteOrXXFF(CallExpr *TheCall, int ArgNum,
13540  unsigned ArgBits);
13541  bool SemaBuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall,
13542  int ArgNum, unsigned ExpectedFieldNum,
13543  bool AllowName);
13544  bool SemaBuiltinARMMemoryTaggingCall(unsigned BuiltinID, CallExpr *TheCall);
13545  bool SemaBuiltinPPCMMACall(CallExpr *TheCall, unsigned BuiltinID,
13546  const char *TypeDesc);
13547 
13548  bool CheckPPCMMAType(QualType Type, SourceLocation TypeLoc);
13549 
13550  bool SemaBuiltinElementwiseMath(CallExpr *TheCall);
13551  bool PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall);
13552  bool PrepareBuiltinReduceMathOneArgCall(CallExpr *TheCall);
13553 
13554  bool SemaBuiltinNonDeterministicValue(CallExpr *TheCall);
13555 
13556  // Matrix builtin handling.
13557  ExprResult SemaBuiltinMatrixTranspose(CallExpr *TheCall,
13558  ExprResult CallResult);
13559  ExprResult SemaBuiltinMatrixColumnMajorLoad(CallExpr *TheCall,
13560  ExprResult CallResult);
13561  ExprResult SemaBuiltinMatrixColumnMajorStore(CallExpr *TheCall,
13562  ExprResult CallResult);
13563 
13564 public:
13576  };
13577  static FormatStringType GetFormatStringType(const FormatAttr *Format);
13578 
13579  bool FormatStringHasSArg(const StringLiteral *FExpr);
13580 
13581  static bool GetFormatNSStringIdx(const FormatAttr *Format, unsigned &Idx);
13582 
13583 private:
13584  bool CheckFormatArguments(const FormatAttr *Format,
13585  ArrayRef<const Expr *> Args, bool IsCXXMember,
13586  VariadicCallType CallType, SourceLocation Loc,
13587  SourceRange Range,
13588  llvm::SmallBitVector &CheckedVarArgs);
13589  bool CheckFormatArguments(ArrayRef<const Expr *> Args,
13590  FormatArgumentPassingKind FAPK, unsigned format_idx,
13591  unsigned firstDataArg, FormatStringType Type,
13592  VariadicCallType CallType, SourceLocation Loc,
13594  llvm::SmallBitVector &CheckedVarArgs);
13595 
13596  void CheckAbsoluteValueFunction(const CallExpr *Call,
13597  const FunctionDecl *FDecl);
13598 
13599  void CheckMaxUnsignedZero(const CallExpr *Call, const FunctionDecl *FDecl);
13600 
13601  void CheckMemaccessArguments(const CallExpr *Call,
13602  unsigned BId,
13603  IdentifierInfo *FnName);
13604 
13605  void CheckStrlcpycatArguments(const CallExpr *Call,
13606  IdentifierInfo *FnName);
13607 
13608  void CheckStrncatArguments(const CallExpr *Call,
13609  IdentifierInfo *FnName);
13610 
13611  void CheckFreeArguments(const CallExpr *E);
13612 
13613  void CheckReturnValExpr(Expr *RetValExp, QualType lhsType,
13614  SourceLocation ReturnLoc,
13615  bool isObjCMethod = false,
13616  const AttrVec *Attrs = nullptr,
13617  const FunctionDecl *FD = nullptr);
13618 
13619 public:
13620  void CheckFloatComparison(SourceLocation Loc, Expr *LHS, Expr *RHS,
13622 
13623 private:
13624  void CheckImplicitConversions(Expr *E, SourceLocation CC = SourceLocation());
13625  void CheckBoolLikeConversion(Expr *E, SourceLocation CC);
13626  void CheckForIntOverflow(Expr *E);
13627  void CheckUnsequencedOperations(const Expr *E);
13628 
13629  /// Perform semantic checks on a completed expression. This will either
13630  /// be a full-expression or a default argument expression.
13631  void CheckCompletedExpr(Expr *E, SourceLocation CheckLoc = SourceLocation(),
13632  bool IsConstexpr = false);
13633 
13634  void CheckBitFieldInitialization(SourceLocation InitLoc, FieldDecl *Field,
13635  Expr *Init);
13636 
13637  /// Check if there is a field shadowing.
13638  void CheckShadowInheritedFields(const SourceLocation &Loc,
13639  DeclarationName FieldName,
13640  const CXXRecordDecl *RD,
13641  bool DeclIsField = true);
13642 
13643  /// Check if the given expression contains 'break' or 'continue'
13644  /// statement that produces control flow different from GCC.
13645  void CheckBreakContinueBinding(Expr *E);
13646 
13647  /// Check whether receiver is mutable ObjC container which
13648  /// attempts to add itself into the container
13649  void CheckObjCCircularContainer(ObjCMessageExpr *Message);
13650 
13651  void CheckTCBEnforcement(const SourceLocation CallExprLoc,
13652  const NamedDecl *Callee);
13653 
13654  void AnalyzeDeleteExprMismatch(const CXXDeleteExpr *DE);
13655  void AnalyzeDeleteExprMismatch(FieldDecl *Field, SourceLocation DeleteLoc,
13656  bool DeleteWasArrayForm);
13657 public:
13658  /// Register a magic integral constant to be used as a type tag.
13659  void RegisterTypeTagForDatatype(const IdentifierInfo *ArgumentKind,
13660  uint64_t MagicValue, QualType Type,
13661  bool LayoutCompatible, bool MustBeNull);
13662 
13663  struct TypeTagData {
13665 
13669  {}
13670 
13672 
13673  /// If true, \c Type should be compared with other expression's types for
13674  /// layout-compatibility.
13675  unsigned LayoutCompatible : 1;
13676  unsigned MustBeNull : 1;
13677  };
13678 
13679  /// A pair of ArgumentKind identifier and magic value. This uniquely
13680  /// identifies the magic value.
13681  typedef std::pair<const IdentifierInfo *, uint64_t> TypeTagMagicValue;
13682 
13683 private:
13684  /// A map from magic value to type information.
13685  std::unique_ptr<llvm::DenseMap<TypeTagMagicValue, TypeTagData>>
13686  TypeTagForDatatypeMagicValues;
13687 
13688  /// Peform checks on a call of a function with argument_with_type_tag
13689  /// or pointer_with_type_tag attributes.
13690  void CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr,
13691  const ArrayRef<const Expr *> ExprArgs,
13692  SourceLocation CallSiteLoc);
13693 
13694  /// Check if we are taking the address of a packed field
13695  /// as this may be a problem if the pointer value is dereferenced.
13696  void CheckAddressOfPackedMember(Expr *rhs);
13697 
13698  /// The parser's current scope.
13699  ///
13700  /// The parser maintains this state here.
13701  Scope *CurScope;
13702 
13703  mutable IdentifierInfo *Ident_super;
13704  mutable IdentifierInfo *Ident___float128;
13705 
13706  /// Nullability type specifiers.
13707  IdentifierInfo *Ident__Nonnull = nullptr;
13708  IdentifierInfo *Ident__Nullable = nullptr;
13709  IdentifierInfo *Ident__Nullable_result = nullptr;
13710  IdentifierInfo *Ident__Null_unspecified = nullptr;
13711 
13712  IdentifierInfo *Ident_NSError = nullptr;
13713 
13714  /// The handler for the FileChanged preprocessor events.
13715  ///
13716  /// Used for diagnostics that implement custom semantic analysis for #include
13717  /// directives, like -Wpragma-pack.
13718  sema::SemaPPCallbacks *SemaPPCallbackHandler;
13719 
13720 protected:
13721  friend class Parser;
13723  friend class ASTReader;
13724  friend class ASTDeclReader;
13725  friend class ASTWriter;
13726 
13727 public:
13728  /// Retrieve the keyword associated
13730 
13731  /// The struct behind the CFErrorRef pointer.
13732  RecordDecl *CFError = nullptr;
13733  bool isCFError(RecordDecl *D);
13734 
13735  /// Retrieve the identifier "NSError".
13737 
13738  /// Retrieve the parser's current scope.
13739  ///
13740  /// This routine must only be used when it is certain that semantic analysis
13741  /// and the parser are in precisely the same context, which is not the case
13742  /// when, e.g., we are performing any kind of template instantiation.
13743  /// Therefore, the only safe places to use this scope are in the parser
13744  /// itself and in routines directly invoked from the parser and *never* from
13745  /// template substitution or instantiation.
13746  Scope *getCurScope() const { return CurScope; }
13747 
13749  return CurScope->incrementMSManglingNumber();
13750  }
13751 
13754 
13756 
13759  }
13760 
13762  const DeclContext *DC = getCurLexicalContext();
13763  // A category implicitly has the attribute of the interface.
13764  if (const ObjCCategoryDecl *CatD = dyn_cast<ObjCCategoryDecl>(DC))
13765  DC = CatD->getClassInterface();
13766  return DC;
13767  }
13768 
13769  /// Determine the number of levels of enclosing template parameters. This is
13770  /// only usable while parsing. Note that this does not include dependent
13771  /// contexts in which no template parameters have yet been declared, such as
13772  /// in a terse function template or generic lambda before the first 'auto' is
13773  /// encountered.
13774  unsigned getTemplateDepth(Scope *S) const;
13775 
13776  /// To be used for checking whether the arguments being passed to
13777  /// function exceeds the number of parameters expected for it.
13778  static bool TooManyArguments(size_t NumParams, size_t NumArgs,
13779  bool PartialOverloading = false) {
13780  // We check whether we're just after a comma in code-completion.
13781  if (NumArgs > 0 && PartialOverloading)
13782  return NumArgs + 1 > NumParams; // If so, we view as an extra argument.
13783  return NumArgs > NumParams;
13784  }
13785 
13786  // Emitting members of dllexported classes is delayed until the class
13787  // (including field initializers) is fully parsed.
13790 
13791 private:
13792  int ParsingClassDepth = 0;
13793 
13794  class SavePendingParsedClassStateRAII {
13795  public:
13796  SavePendingParsedClassStateRAII(Sema &S) : S(S) { swapSavedState(); }
13797 
13798  ~SavePendingParsedClassStateRAII() {
13799  assert(S.DelayedOverridingExceptionSpecChecks.empty() &&
13800  "there shouldn't be any pending delayed exception spec checks");
13801  assert(S.DelayedEquivalentExceptionSpecChecks.empty() &&
13802  "there shouldn't be any pending delayed exception spec checks");
13803  swapSavedState();
13804  }
13805 
13806  private:
13807  Sema &S;
13809  SavedOverridingExceptionSpecChecks;
13811  SavedEquivalentExceptionSpecChecks;
13812 
13813  void swapSavedState() {
13814  SavedOverridingExceptionSpecChecks.swap(
13815  S.DelayedOverridingExceptionSpecChecks);
13816  SavedEquivalentExceptionSpecChecks.swap(
13817  S.DelayedEquivalentExceptionSpecChecks);
13818  }
13819  };
13820 
13821  /// Helper class that collects misaligned member designations and
13822  /// their location info for delayed diagnostics.
13823  struct MisalignedMember {
13824  Expr *E;
13825  RecordDecl *RD;
13826  ValueDecl *MD;
13827  CharUnits Alignment;
13828 
13829  MisalignedMember() : E(), RD(), MD() {}
13830  MisalignedMember(Expr *E, RecordDecl *RD, ValueDecl *MD,
13831  CharUnits Alignment)
13832  : E(E), RD(RD), MD(MD), Alignment(Alignment) {}
13833  explicit MisalignedMember(Expr *E)
13834  : MisalignedMember(E, nullptr, nullptr, CharUnits()) {}
13835 
13836  bool operator==(const MisalignedMember &m) { return this->E == m.E; }
13837  };
13838  /// Small set of gathered accesses to potentially misaligned members
13839  /// due to the packed attribute.
13840  SmallVector<MisalignedMember, 4> MisalignedMembers;
13841 
13842  /// Adds an expression to the set of gathered misaligned members.
13843  void AddPotentialMisalignedMembers(Expr *E, RecordDecl *RD, ValueDecl *MD,
13844  CharUnits Alignment);
13845 
13846 public:
13847  /// Diagnoses the current set of gathered accesses. This typically
13848  /// happens at full expression level. The set is cleared after emitting the
13849  /// diagnostics.
13851 
13852  /// This function checks if the expression is in the sef of potentially
13853  /// misaligned members and it is converted to some pointer type T with lower
13854  /// or equal alignment requirements. If so it removes it. This is used when
13855  /// we do not want to diagnose such misaligned access (e.g. in conversions to
13856  /// void*).
13857  void DiscardMisalignedMemberAddress(const Type *T, Expr *E);
13858 
13859  /// This function calls Action when it determines that E designates a
13860  /// misaligned member due to the packed attribute. This is used to emit
13861  /// local diagnostics like in reference binding.
13863  Expr *E,
13864  llvm::function_ref<void(Expr *, RecordDecl *, FieldDecl *, CharUnits)>
13865  Action);
13866 
13867  /// Describes the reason a calling convention specification was ignored, used
13868  /// for diagnostics.
13870  ForThisTarget = 0,
13874  };
13875  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
13876  /// context is "used as device code".
13877  ///
13878  /// - If CurLexicalContext is a kernel function or it is known that the
13879  /// function will be emitted for the device, emits the diagnostics
13880  /// immediately.
13881  /// - If CurLexicalContext is a function and we are compiling
13882  /// for the device, but we don't know that this function will be codegen'ed
13883  /// for devive yet, creates a diagnostic which is emitted if and when we
13884  /// realize that the function will be codegen'ed.
13885  ///
13886  /// Example usage:
13887  ///
13888  /// Diagnose __float128 type usage only from SYCL device code if the current
13889  /// target doesn't support it
13890  /// if (!S.Context.getTargetInfo().hasFloat128Type() &&
13891  /// S.getLangOpts().SYCLIsDevice)
13892  /// SYCLDiagIfDeviceCode(Loc, diag::err_type_unsupported) << "__float128";
13893  SemaDiagnosticBuilder SYCLDiagIfDeviceCode(SourceLocation Loc,
13894  unsigned DiagID);
13895 
13896  /// Check whether we're allowed to call Callee from the current context.
13897  ///
13898  /// - If the call is never allowed in a semantically-correct program
13899  /// emits an error and returns false.
13900  ///
13901  /// - If the call is allowed in semantically-correct programs, but only if
13902  /// it's never codegen'ed, creates a deferred diagnostic to be emitted if
13903  /// and when the caller is codegen'ed, and returns true.
13904  ///
13905  /// - Otherwise, returns true without emitting any diagnostics.
13906  ///
13907  /// Adds Callee to DeviceCallGraph if we don't know if its caller will be
13908  /// codegen'ed yet.
13911  llvm::DenseSet<QualType> Visited,
13912  ValueDecl *DeclToCheck);
13913 };
13914 
13915 /// RAII object that enters a new expression evaluation context.
13917  Sema &Actions;
13918  bool Entered = true;
13919 
13920 public:
13922  Sema &Actions, Sema::ExpressionEvaluationContext NewContext,
13923  Decl *LambdaContextDecl = nullptr,
13926  bool ShouldEnter = true)
13927  : Actions(Actions), Entered(ShouldEnter) {
13928  if (Entered)
13929  Actions.PushExpressionEvaluationContext(NewContext, LambdaContextDecl,
13930  ExprContext);
13931  }
13933  Sema &Actions, Sema::ExpressionEvaluationContext NewContext,
13937  : Actions(Actions) {
13939  NewContext, Sema::ReuseLambdaContextDecl, ExprContext);
13940  }
13941 
13944  bool ShouldEnter = true)
13945  : Actions(Actions), Entered(false) {
13946  // In C++11 onwards, narrowing checks are performed on the contents of
13947  // braced-init-lists, even when they occur within unevaluated operands.
13948  // Therefore we still need to instantiate constexpr functions used in such
13949  // a context.
13950  if (ShouldEnter && Actions.isUnevaluatedContext() &&
13951  Actions.getLangOpts().CPlusPlus11) {
13954  Entered = true;
13955  }
13956  }
13957 
13959  if (Entered)
13961  }
13962 };
13963 
13964 DeductionFailureInfo
13966  sema::TemplateDeductionInfo &Info);
13967 
13968 /// Contains a late templated function.
13969 /// Will be parsed at the end of the translation unit, used by Sema & Parser.
13972  /// The template function declaration to be late parsed.
13974 };
13975 
13976 template <>
13978  PragmaMsStackAction Action,
13979  llvm::StringRef StackSlotLabel,
13980  AlignPackInfo Value);
13981 
13982 std::unique_ptr<sema::RISCVIntrinsicManager>
13984 } // end namespace clang
13985 
13986 namespace llvm {
13987 // Hash a FunctionDeclAndLoc by looking at both its FunctionDecl and its
13988 // SourceLocation.
13989 template <> struct DenseMapInfo<clang::Sema::FunctionDeclAndLoc> {
13991  using FDBaseInfo = DenseMapInfo<clang::CanonicalDeclPtr<clang::FunctionDecl>>;
13992 
13994  return {FDBaseInfo::getEmptyKey(), clang::SourceLocation()};
13995  }
13996 
13998  return {FDBaseInfo::getTombstoneKey(), clang::SourceLocation()};
13999  }
14000 
14001  static unsigned getHashValue(const FunctionDeclAndLoc &FDL) {
14002  return hash_combine(FDBaseInfo::getHashValue(FDL.FD),
14003  FDL.Loc.getHashValue());
14004  }
14005 
14006  static bool isEqual(const FunctionDeclAndLoc &LHS,
14007  const FunctionDeclAndLoc &RHS) {
14008  return LHS.FD == RHS.FD && LHS.Loc == RHS.Loc;
14009  }
14010 };
14011 } // namespace llvm
14012 
14013 #endif
clang::Sema::ActOnSuperMessage
ExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2380
clang::Sema::DelayedDiagnostics::pushUndelayed
DelayedDiagnosticsState pushUndelayed()
Enter a new scope where access and deprecation diagnostics are not delayed.
Definition: Sema.h:985
clang::Sema::ActOnCXXConditionDeclaration
DeclResult ActOnCXXConditionDeclaration(Scope *S, Declarator &D)
ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statem...
Definition: SemaDeclCXX.cpp:17883
clang::Sema::ActOnOpenMPDepobjClause
OMPClause * ActOnOpenMPDepobjClause(Expr *Depobj, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depobj' pseudo clause.
Definition: SemaOpenMP.cpp:20483
clang::Sema::InstantiateAttrsForDecl
void InstantiateAttrsForDecl(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
Definition: SemaTemplateInstantiateDecl.cpp:656
clang::Sema::CodeCompleteObjCSuperclass
void CodeCompleteObjCSuperclass(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
Definition: SemaCodeComplete.cpp:8466
clang::Sema::MissingImportKind::DefaultArgument
@ DefaultArgument
clang::Sema::finishLambdaExplicitCaptures
void finishLambdaExplicitCaptures(sema::LambdaScopeInfo *LSI)
Note that we have finished the explicit captures for the given lambda.
Definition: SemaLambda.cpp:526
clang::Sema::MissingImportKind::Declaration
@ Declaration
clang::ElaboratedTypeKeyword
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
Definition: Type.h:5566
clang::Sema::CheckConversionToObjCLiteral
bool CheckConversionToObjCLiteral(QualType DstType, Expr *&SrcExpr, bool Diagnose=true)
Definition: SemaExpr.cpp:17059
clang::ExplicitSpecifier
Store information needed for an explicit specifier.
Definition: DeclCXX.h:1842
clang::OpenMPDeviceClauseModifier
OpenMPDeviceClauseModifier
OpenMP modifiers for 'device' clause.
Definition: OpenMPKinds.h:47
clang::Sema::NamedReturnInfo::isCopyElidable
bool isCopyElidable() const
Definition: Sema.h:5174
clang::Sema::ActOnLabelStmt
StmtResult ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
Definition: SemaStmt.cpp:553
clang::Sema::CheckVectorLogicalOperands
QualType CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
Definition: SemaExpr.cpp:13389
clang::Sema::getPrintable
static SourceRange getPrintable(SourceLocation L)
Definition: Sema.h:2191
clang::Sema::OOK_Outside
@ OOK_Outside
Definition: Sema.h:3316
clang::Sema::NTK_TemplateTemplateArgument
@ NTK_TemplateTemplateArgument
Definition: Sema.h:3295
clang::Sema::ActOnOpenMPDeclareReductionCombinerStart
void ActOnOpenMPDeclareReductionCombinerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
Definition: SemaOpenMP.cpp:22184
clang::Sema::ActOnOpenMPOrderedClause
OMPClause * ActOnOpenMPOrderedClause(SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr)
Called on well-formed 'ordered' clause.
Definition: SemaOpenMP.cpp:16606
clang::Sema::AddSectionMSAllocText
void AddSectionMSAllocText(FunctionDecl *FD)
Only called on function definitions; if there is a #pragma alloc_text that decides which code section...
Definition: SemaAttr.cpp:1192
clang::Sema::ImmediateDiagBuilder::ImmediateDiagBuilder
ImmediateDiagBuilder(DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
Definition: Sema.h:1704
clang::Sema::CheckShadow
void CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, const LookupResult &R)
Diagnose variable or built-in function shadowing.
Definition: SemaDecl.cpp:8180
clang::Sema::hasAnyUnrecoverableErrorsInThisFunction
bool hasAnyUnrecoverableErrorsInThisFunction() const
Determine whether any errors occurred within this function/method/ block.
Definition: Sema.cpp:2279
clang::Sema::ActOnModuleImport
DeclResult ActOnModuleImport(SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, ModuleIdPath Path, bool IsPartition=false)
The parser has processed a module import declaration.
Definition: SemaModule.cpp:471
clang::Sema::AtomicArgumentOrder
AtomicArgumentOrder
Definition: Sema.h:5864
clang::Sema::IER_Error
@ IER_Error
An error occurred.
Definition: Sema.h:6016
clang::Sema::getPrintable
static SourceRange getPrintable(TypeLoc TL)
Definition: Sema.h:2193
clang::UnqualifiedId
Represents a C++ unqualified-id that has been parsed.
Definition: DeclSpec.h:973
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1146
clang::Sema::SpecialMemberOverloadResult
SpecialMemberOverloadResult - The overloading result for a special member function.
Definition: Sema.h:1422
clang::Sema::DiagnoseEqualityWithExtraParens
void DiagnoseEqualityWithExtraParens(ParenExpr *ParenE)
Redundant parentheses over an equality comparison can indicate that the user intended an assignment u...
Definition: SemaExpr.cpp:20332
clang::Sema::resolveAssumedTemplateNameAsType
bool resolveAssumedTemplateNameAsType(Scope *S, TemplateName &Name, SourceLocation NameLoc, bool Diagnose=true)
Definition: SemaTemplate.cpp:4041
clang::NormalizedConstraint
A normalized constraint, as defined in C++ [temp.constr.normal], is either an atomic constraint,...
Definition: SemaConcept.h:81
clang::Sema::PCC_ObjCInterface
@ PCC_ObjCInterface
Code completion occurs within an Objective-C interface, protocol, or category.
Definition: Sema.h:13210
clang::Sema::TDK_Inconsistent
@ TDK_Inconsistent
Template argument deduction produced inconsistent deduced values for the given template parameter.
Definition: Sema.h:8969
clang::NonOdrUseReason
NonOdrUseReason
The reason why a DeclRefExpr does not constitute an odr-use.
Definition: Specifiers.h:161
clang::Sema::SemaConvertVectorExpr
ExprResult SemaConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
SemaConvertVectorExpr - Handle __builtin_convertvector.
Definition: SemaChecking.cpp:7738
clang::Sema::DelegatingCtorDeclsType
LazyVector< CXXConstructorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > DelegatingCtorDeclsType
Definition: Sema.h:897
clang::Sema::CheckDelayedMemberExceptionSpecs
void CheckDelayedMemberExceptionSpecs()
Definition: SemaDeclCXX.cpp:8940
clang::Sema::RequireCompleteSizedExprType
bool RequireCompleteSizedExprType(Expr *E, unsigned DiagID, const Ts &... Args)
Definition: Sema.h:2531
clang::Sema::UnifySection
bool UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *TheDecl)
Definition: SemaAttr.cpp:700
clang::Sema::BuildDeclarationNameExpr
ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false)
Definition: SemaExpr.cpp:3225
clang::Sema::isModuleDirectlyImported
bool isModuleDirectlyImported(const Module *M)
Definition: Sema.h:2343
clang::Sema::ImplicitExceptionSpecification::getExceptionSpec
FunctionProtoType::ExceptionSpecInfo getExceptionSpec() const
Overwrite an EPI's exception specification with this computed exception specification.
Definition: Sema.h:6330
clang::Sema::BuildCXXDefaultInitExpr
ExprResult BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field)
Definition: SemaExpr.cpp:6042
clang::Sema::CurContext
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
Definition: Sema.h:421
clang::Sema::ReplaceAutoType
QualType ReplaceAutoType(QualType TypeWithAuto, QualType Replacement)
Completely replace the auto in TypeWithAuto by Replacement.
Definition: SemaTemplateDeduction.cpp:4896
clang::Sema::ExpressionEvaluationContextRecord::InitializationContext
Definition: Sema.h:1345
clang::Sema::actOnObjCProtocolQualifierType
TypeResult actOnObjCProtocolQualifierType(SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc)
Build a an Objective-C protocol-qualified 'id' type where no base type was specified.
Definition: SemaType.cpp:1094
clang::Sema::InstantiateVariableInitializer
void InstantiateVariableInitializer(VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the initializer of a variable.
Definition: SemaTemplateInstantiateDecl.cpp:5323
NSAPI.h
clang::Sema::CCEK_ExplicitBool
@ CCEK_ExplicitBool
Condition in an explicit(bool) specifier.
Definition: Sema.h:3856
clang::Sema::ActOnOpenMPVarListClause
OMPClause * ActOnOpenMPVarListClause(OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, const OMPVarListLocTy &Locs, OpenMPVarListDataTy &Data)
Definition: SemaOpenMP.cpp:17777
clang::Sema::RefsMinusAssignments
llvm::DenseMap< const VarDecl *, int > RefsMinusAssignments
Increment when we find a reference; decrement when we find an ignored assignment.
Definition: Sema.h:1626
clang::Sema::isSFINAEContext
std::optional< sema::TemplateDeductionInfo * > isSFINAEContext() const
Determines whether we are currently in a context where template argument substitution failures are no...
Definition: SemaTemplateInstantiate.cpp:1015
clang::Sema::VTableUses
SmallVector< VTableUse, 16 > VTableUses
The list of vtables that are required but have not yet been materialized.
Definition: Sema.h:7637
clang::Sema::UPPC_Expression
@ UPPC_Expression
An arbitrary expression.
Definition: Sema.h:8591
clang::Sema::DefaultArgumentPromotion
ExprResult DefaultArgumentPromotion(Expr *E)
DefaultArgumentPromotion (C99 6.5.2.2p6).
Definition: SemaExpr.cpp:857
Builtins.h
clang::Sema::getUndefinedButUsed
void getUndefinedButUsed(SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
Obtain a sorted list of functions that are undefined but ODR-used.
Definition: Sema.cpp:800
clang::ObjCBridgeCastKind
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
Definition: OperationKinds.h:36
clang::Sema::LookupTemplateName
bool LookupTemplateName(LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate=SourceLocation(), AssumedTemplateKind *ATK=nullptr, bool AllowTypoCorrection=true)
Definition: SemaTemplate.cpp:375
clang::Sema::CheckAdditionOperands
QualType CheckAdditionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType *CompLHSTy=nullptr)
Definition: SemaExpr.cpp:11408
clang::Sema::CorrectTypoKind
CorrectTypoKind
Definition: Sema.h:4524
clang::Sema::ActOnOpenMPDistributeDirective
StmtResult ActOnOpenMPDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13879
clang::Sema::CodeCompleteOperatorName
void CodeCompleteOperatorName(Scope *S)
Definition: SemaCodeComplete.cpp:6760
clang::Sema::DiagnoseDuplicateIvars
void DiagnoseDuplicateIvars(ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementatio...
Definition: SemaDeclObjC.cpp:3768
clang::Sema::CFP_Never
@ CFP_Never
Definition: Sema.h:13084
clang::Sema::setFunctionHasIndirectGoto
void setFunctionHasIndirectGoto()
Definition: Sema.cpp:2293
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1611
clang::Sema::FindAllocationFunctions
bool FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose=true)
Finds the overloads of operator new and delete that are appropriate for the allocation.
Definition: SemaExprCXX.cpp:2630
clang::Sema::VAListTagName
DeclarationName VAListTagName
VAListTagName - The declaration name corresponding to __va_list_tag.
Definition: Sema.h:429
clang::Sema::isDependentScopeSpecifier
bool isDependentScopeSpecifier(const CXXScopeSpec &SS)
Definition: SemaCXXScopeSpec.cpp:167
clang::ObjCDeclSpec
Captures information about "declaration specifiers" specific to Objective-C.
Definition: DeclSpec.h:845
clang::Sema::getCapturedDeclRefType
QualType getCapturedDeclRefType(ValueDecl *Var, SourceLocation Loc)
Given a variable, determine the type that a reference to that variable will have in the given scope.
Definition: SemaExpr.cpp:19300
clang::Sema::warnStackExhausted
void warnStackExhausted(SourceLocation Loc)
Warn that the stack is nearly exhausted.
Definition: Sema.cpp:495
clang::Sema::NC_FunctionTemplate
@ NC_FunctionTemplate
The name was classified as a function template name.
Definition: Sema.h:2659
clang::Sema::RetainOwnershipKind::OS
@ OS
clang::Sema::ActOnExplicitInstantiation
DeclResult ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, const ParsedAttributesView &Attr)
Definition: SemaTemplate.cpp:9882
clang::Sema::FullExprArg::release
ExprResult release()
Definition: Sema.h:4984
clang::Sema::getNonFieldDeclScope
Scope * getNonFieldDeclScope(Scope *S)
getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be dec...
Definition: SemaDecl.cpp:2351
clang::AccessSpecDecl
Represents an access specifier followed by colon ':'.
Definition: DeclCXX.h:86
clang::Sema::AvailabilityPriority
AvailabilityPriority
Describes the kind of priority given to an availability attribute.
Definition: Sema.h:3621
clang::Sema::CorrectTypoDelayed
TypoExpr * CorrectTypoDelayed(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
Definition: SemaLookup.cpp:5510
clang::ArrayTypeTrait
ArrayTypeTrait
Names for the array type traits.
Definition: TypeTraits.h:42
clang::Sema::diagnoseQualifiedDeclaration
bool diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc, bool IsTemplateId)
Diagnose a declaration whose declarator-id has the given nested-name-specifier.
Definition: SemaDecl.cpp:6134
clang::Sema::PragmaOptionsAlignKind
PragmaOptionsAlignKind
Definition: Sema.h:10574
clang::ASTConstraintSatisfaction
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Definition: ASTConcept.h:84
clang::Sema::isOpenMPGlobalCapturedDecl
bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified global variable must be captured by outer capture regions.
Definition: SemaOpenMP.cpp:2651
clang::Sema::makeMergedDefinitionVisible
void makeMergedDefinitionVisible(NamedDecl *ND)
Make a merged definition of an existing hidden definition ND visible at the specified location.
Definition: SemaLookup.cpp:1516
clang::Sema::ActOnGlobalModuleFragmentDecl
DeclGroupPtrTy ActOnGlobalModuleFragmentDecl(SourceLocation ModuleLoc)
The parser has processed a global-module-fragment declaration that begins the definition of the globa...
Definition: SemaModule.cpp:76
clang::Sema::isInitListConstructor
bool isInitListConstructor(const FunctionDecl *Ctor)
Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init....
Definition: SemaDeclCXX.cpp:11668
clang::Sema::PragmaClangRelroSection
PragmaClangSection PragmaClangRelroSection
Definition: Sema.h:473
clang::Sema::CheckConceptTemplateId
ExprResult CheckConceptTemplateId(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &ConceptNameInfo, NamedDecl *FoundDecl, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:4860
clang::Sema::ActOnTemplateParameterList
TemplateParameterList * ActOnTemplateParameterList(unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause)
ActOnTemplateParameterList - Builds a TemplateParameterList, optionally constrained by RequiresClause...
Definition: SemaTemplate.cpp:1788
clang::Sema::DelayedDiagnostics
A class which encapsulates the logic for delaying diagnostics during parsing and other processing.
Definition: Sema.h:948
clang::Sema::ModuleImportState::NotACXX20Module
@ NotACXX20Module
Not a C++20 TU, or an invalid state was found.
clang::Sema::CheckConditionVariable
ExprResult CheckConditionVariable(VarDecl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement...
Definition: SemaExprCXX.cpp:3990
clang::Sema::InstantiatingTemplate::ParameterMappingSubstitution
Definition: Sema.h:9579
clang::EnterExpressionEvaluationContext::~EnterExpressionEvaluationContext
~EnterExpressionEvaluationContext()
Definition: Sema.h:13958
clang::Sema::isCurrentClassNameTypo
bool isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS)
Determine whether the identifier II is a typo for the name of the class type currently being defined.
Definition: SemaDeclCXX.cpp:2473
clang::Sema::ActOnOpenMPRegionEnd
StmtResult ActOnOpenMPRegionEnd(StmtResult S, ArrayRef< OMPClause * > Clauses)
End of OpenMP region.
Definition: SemaOpenMP.cpp:4791
clang::Sema::BuildReadPipeType
QualType BuildReadPipeType(QualType T, SourceLocation Loc)
Build a Read-only Pipe type.
Definition: SemaType.cpp:2290
clang::Sema::ActOnStartOpenMPDeclareTargetContext
bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called on the start of target region i.e. '#pragma omp declare target'.
Definition: SemaOpenMP.cpp:22844
clang::Sema::DefaultedFunctionKind::getDiagnosticIndex
unsigned getDiagnosticIndex() const
Get the index of this function kind for use in diagnostics.
Definition: Sema.h:3419
clang::Sema::TDK_AlreadyDiagnosed
@ TDK_AlreadyDiagnosed
Some error which was already diagnosed.
Definition: Sema.h:9007
clang::Sema::ActOnOpenMPSimpleClause
OMPClause * ActOnOpenMPSimpleClause(OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:16631
clang::Sema::OpenMPVarListDataTy::ColonLoc
SourceLocation ColonLoc
Definition: Sema.h:11978
clang::Sema::LookupNamespaceName
@ LookupNamespaceName
Look up a namespace name within a C++ using directive or namespace alias definition,...
Definition: Sema.h:4311
clang::Sema::ActOnOpenMPWriteClause
OMPClause * ActOnOpenMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'write' clause.
Definition: SemaOpenMP.cpp:17426
clang::Sema::CheckFunctionReturnType
bool CheckFunctionReturnType(QualType T, SourceLocation Loc)
Definition: SemaType.cpp:2869
clang::Sema::ExpressionEvaluationContextRecord::EK_TemplateArgument
@ EK_TemplateArgument
Definition: Sema.h:1331
clang::Sema::ScalarTypeToBooleanCastKind
static CastKind ScalarTypeToBooleanCastKind(QualType ScalarTy)
ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ...
Definition: Sema.cpp:703
clang::Sema::ActOnCapturedRegionEnd
StmtResult ActOnCapturedRegionEnd(Stmt *S)
Definition: SemaStmt.cpp:4804
clang::Sema::MissingImportKind::PartialSpecialization
@ PartialSpecialization
clang::Sema::getFormatStringInfo
static bool getFormatStringInfo(const FormatAttr *Format, bool IsCXXMember, bool IsVariadic, FormatStringInfo *FSI)
Given a FunctionDecl's FormatAttr, attempts to populate the FomatStringInfo parameter with the Format...
Definition: SemaChecking.cpp:5619
clang::FileNullabilityMap::Nullability
FileNullability Nullability
Definition: Sema.h:274
clang::Sema::LookupOverloadedBinOp
void LookupOverloadedBinOp(OverloadCandidateSet &CandidateSet, OverloadedOperatorKind Op, const UnresolvedSetImpl &Fns, ArrayRef< Expr * > Args, bool RequiresADL=true)
Perform lookup for an overloaded binary operator.
Definition: SemaOverload.cpp:13732
clang::Sema::NoteAllFoundTemplates
void NoteAllFoundTemplates(TemplateName Name)
Definition: SemaTemplate.cpp:3570
clang::Sema::runWithSufficientStackSpace
void runWithSufficientStackSpace(SourceLocation Loc, llvm::function_ref< void()> Fn)
Run some code with "sufficient" stack space.
Definition: Sema.cpp:503
clang::Sema::ObjCArgInfo::Type
ParsedType Type
Definition: Sema.h:10391
clang::Sema::AlignPackInfo::getFromRawEncoding
static AlignPackInfo getFromRawEncoding(unsigned Encoding)
Definition: Sema.h:532
clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation
bool RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS)
Definition: SemaTemplate.cpp:11202
clang::PreferredTypeBuilder::enterBinary
void enterBinary(Sema &S, SourceLocation Tok, Expr *LHS, tok::TokenKind Op)
Definition: SemaCodeComplete.cpp:557
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::Sema::CheckSizelessVectorCompareOperands
QualType CheckSizelessVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:13226
clang::Sema::NTCUK_Init
@ NTCUK_Init
Definition: Sema.h:3020
clang::Sema::InstantiateClass
bool InstantiateClass(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
Instantiate the definition of a class from a given pattern.
Definition: SemaTemplateInstantiate.cpp:3057
Weak.h
clang::Sema::getMoreSpecializedTemplate
FunctionTemplateDecl * getMoreSpecializedTemplate(FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2, bool Reversed=false)
Returns the more specialized function template according to the rules of function template partial or...
Definition: SemaTemplateDeduction.cpp:5194
clang::Sema::CheckPlaceholderExpr
ExprResult CheckPlaceholderExpr(Expr *E)
Check for operands with placeholder types and complain if found.
Definition: SemaExpr.cpp:20947
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2448
clang::Sema::MarkAsLateParsedTemplate
void MarkAsLateParsedTemplate(FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
Definition: SemaTemplate.cpp:11309
clang::Sema::CheckLValueToRValueConversionOperand
ExprResult CheckLValueToRValueConversionOperand(Expr *E)
Definition: SemaExpr.cpp:19661
clang::Sema::GetSignedVectorType
QualType GetSignedVectorType(QualType V)
Definition: SemaExpr.cpp:13106
clang::Sema::ActOnCXXNestedNameSpecifier
bool ActOnCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
The parser has parsed a nested-name-specifier 'identifier::'.
Definition: SemaCXXScopeSpec.cpp:855
clang::Sema::PopCompoundScope
void PopCompoundScope()
Definition: Sema.cpp:2270
clang::Sema::OOK_Builtin
@ OOK_Builtin
Definition: Sema.h:3318
clang::Sema::ActOnParamDefaultArgumentError
void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc)
ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the paramet...
Definition: SemaDeclCXX.cpp:390
clang::Sema::ActOnOpenMPCaptureClause
OMPClause * ActOnOpenMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'capture' clause.
Definition: SemaOpenMP.cpp:17436
clang::Sema::PCSA_Set
@ PCSA_Set
Definition: Sema.h:460
clang::Sema::CheckObjCPropertyAttributes
void CheckObjCPropertyAttributes(Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
Ensure attributes are consistent with type.
Definition: SemaObjCProperty.cpp:2636
clang::Sema::BuildUsingEnumDeclaration
NamedDecl * BuildUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, TypeSourceInfo *EnumType, EnumDecl *ED)
Definition: SemaDeclCXX.cpp:12647
clang::Sema::GetIvarBackingPropertyAccessor
ObjCIvarDecl * GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ...
Definition: SemaDeclObjC.cpp:5278
clang::Sema::RetainOwnershipKind
RetainOwnershipKind
Definition: Sema.h:10872
clang::Sema::BuildAttributedStmt
StmtResult BuildAttributedStmt(SourceLocation AttrsLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
Definition: SemaStmt.cpp:582
clang::Sema::MatchTemplateParametersToScopeSpecifier
TemplateParameterList * MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic=false)
Match the given template parameter lists to the given scope specifier, returning the template paramet...
Definition: SemaTemplate.cpp:3209
clang::Sema::DiagnoseUnusedNestedTypedefs
void DiagnoseUnusedNestedTypedefs(const RecordDecl *D)
Definition: SemaDecl.cpp:2096
clang::Sema::UnparsedDefaultArgInstantiations
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
A mapping from parameters with unparsed default arguments to the set of instantiations of each parame...
Definition: Sema.h:1486
clang::Sema::ActOnNoexceptExpr
ExprResult ActOnNoexceptExpr(SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen)
Definition: SemaExprCXX.cpp:8095
clang::Sema::SubstDeclarationNameInfo
DeclarationNameInfo SubstDeclarationNameInfo(const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
Do template substitution on declaration name info.
Definition: SemaTemplateInstantiate.cpp:3977
clang::Sema::DiagnoseUnimplementedProperties
void DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by...
Definition: SemaObjCProperty.cpp:2030
clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind
ExpressionKind
Describes whether we are in an expression constext which we have to handle differently.
Definition: Sema.h:1330
clang::Sema::TDK_Invalid
@ TDK_Invalid
The declaration was invalid; do nothing.
Definition: Sema.h:8957
clang::Sema::PCC_Namespace
@ PCC_Namespace
Code completion occurs at top-level or namespace context.
Definition: Sema.h:13205
clang::Sema::CheckSizelessVectorConditionalTypes
QualType CheckSizelessVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
Definition: SemaExprCXX.cpp:6377
clang::Sema::IncompatiblePointer
@ IncompatiblePointer
IncompatiblePointer - The assignment is between two pointers types that are not compatible,...
Definition: Sema.h:12375
clang::Sema::ActOnOpenMPMessageClause
OMPClause * ActOnOpenMPMessageClause(Expr *MS, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'message' clause.
Definition: SemaOpenMP.cpp:16877
clang::Sema::RecordDeclSetTy
llvm::SmallPtrSet< const CXXRecordDecl *, 8 > RecordDeclSetTy
Definition: Sema.h:863
Specifiers.h
clang::Sema::ActOnStartDelayedCXXMethodDeclaration
void ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class,...
Definition: SemaDeclCXX.cpp:10468
clang::Sema::CheckOverloadedOperatorDeclaration
bool CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl)
CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is wel...
Definition: SemaDeclCXX.cpp:15945
clang::Sema::GetFormatNSStringIdx
static bool GetFormatNSStringIdx(const FormatAttr *Format, unsigned &Idx)
Definition: SemaChecking.cpp:5680
clang::Sema::DiagnoseUseOfDecl
bool DiagnoseUseOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReciever=nullptr, bool SkipTrailingRequiresClause=false)
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
Definition: SemaExpr.cpp:222
clang::Sema::ActOnOpenMPGrainsizeClause
OMPClause * ActOnOpenMPGrainsizeClause(OpenMPGrainsizeClauseModifier Modifier, Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'grainsize' clause.
Definition: SemaOpenMP.cpp:22560
clang::Sema::CheckPackExpansion
TypeSourceInfo * CheckPackExpansion(TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, std::optional< unsigned > NumExpansions)
Construct a pack expansion type from the pattern of the pack expansion.
Definition: SemaTemplateVariadic.cpp:625
clang::Sema::CompareReferenceRelationship
ReferenceCompareResult CompareReferenceRelationship(SourceLocation Loc, QualType T1, QualType T2, ReferenceConversions *Conv=nullptr)
CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are referenc...
Definition: SemaOverload.cpp:4621
clang::Sema::NC_NonType
@ NC_NonType
The name was classified as a specific non-type, non-template declaration.
Definition: Sema.h:2640
clang::Sema::SubstConstraintExpr
ExprResult SubstConstraintExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3931
clang::interp::APInt
llvm::APInt APInt
Definition: Integral.h:29
clang::Sema::ActOnInitList
ExprResult ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
Definition: SemaExpr.cpp:7573
clang::Sema::CleanupVarDeclMarking
void CleanupVarDeclMarking()
Definition: SemaExpr.cpp:19697
clang::Sema::isExternalWithNoLinkageType
bool isExternalWithNoLinkageType(ValueDecl *VD)
Determine if VD, which must be a variable or function, is an external symbol that nonetheless can't b...
Definition: Sema.cpp:789
clang::Sema::ArrayWithObjectsMethod
ObjCMethodDecl * ArrayWithObjectsMethod
The declaration of the arrayWithObjects:count: method.
Definition: Sema.h:1206
clang::Sema::DelayedDllExportMemberFunctions
SmallVector< CXXMethodDecl *, 4 > DelayedDllExportMemberFunctions
Definition: Sema.h:13789
clang::Sema::ConditionKind::Boolean
@ Boolean
A boolean condition, from 'if', 'while', 'for', or 'do'.
clang::Sema::ExpressionEvaluationContextRecord::ExpressionEvaluationContextRecord
ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context, unsigned NumCleanupObjects, CleanupInfo ParentCleanup, Decl *ManglingContextDecl, ExpressionKind ExprContext)
Definition: Sema.h:1358
clang::Sema::ForVisibleRedeclaration
@ ForVisibleRedeclaration
The lookup results will be used for redeclaration of a name, if an entity by that name already exists...
Definition: Sema.h:4344
clang::Sema::ActOnOpenMPMaskedTaskLoopDirective
StmtResult ActOnOpenMPMaskedTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp masked taskloop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13489
clang::DiagnosticBuilder
A little helper class used to produce diagnostics.
Definition: Diagnostic.h:1266
clang::Sema::deduceClosureReturnType
void deduceClosureReturnType(sema::CapturingScopeInfo &CSI)
Deduce a block or lambda's return type based on the return statements present in the body.
Definition: SemaLambda.cpp:705
clang::Sema::LoadExternalVTableUses
void LoadExternalVTableUses()
Load any externally-stored vtable uses.
Definition: SemaDeclCXX.cpp:17904
clang::Sema::TUKind
const TranslationUnitKind TUKind
The kind of translation unit we are processing.
Definition: Sema.h:1469
clang::Sema::GlobalMethodPool::count
int count(Selector Sel) const
Definition: Sema.h:1520
clang::Sema::PreferredConditionType
QualType PreferredConditionType(ConditionKind K) const
Definition: Sema.h:12830
clang::Sema::deduceOpenCLAddressSpace
void deduceOpenCLAddressSpace(ValueDecl *decl)
Definition: SemaDecl.cpp:6870
clang::Sema::UsesAllocatorsData::LParenLoc
SourceLocation LParenLoc
Locations of '(' and ')' symbols.
Definition: Sema.h:12175
clang::TemplateIdAnnotation
Information about a template-id annotation token.
Definition: ParsedTemplate.h:149
clang::Sema::ImplicitExceptionSpecification::CalledExpr
void CalledExpr(Expr *E)
Integrate an invoked expression into the collected data.
Definition: Sema.h:6323
clang::Sema::AvailabilityMergeKind
AvailabilityMergeKind
Describes the kind of merge to perform for availability attributes (including "deprecated",...
Definition: Sema.h:3592
clang::Sema::ActOnTypedefNameDecl
NamedDecl * ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration)
ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name,...
Definition: SemaDecl.cpp:6724
clang::Sema::CheckVectorCompareOperands
QualType CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vecto...
Definition: SemaExpr.cpp:13165
clang::Sema::DeferDiags
bool DeferDiags
Whether deferrable diagnostics should be deferred.
Definition: Sema.h:1888
clang::Sema::VisibleNamespaceCache
llvm::DenseMap< NamedDecl *, NamedDecl * > VisibleNamespaceCache
Map from the most recent declaration of a namespace to the most recent visible declaration of that na...
Definition: Sema.h:9384
clang::Sema::LookupLiteralOperator
LiteralOperatorLookupResult LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate, bool DiagnoseMissing, StringLiteral *StringLit=nullptr)
LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal,...
Definition: SemaLookup.cpp:3645
clang::Sema::NestedNameSpecInfo::NestedNameSpecInfo
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, QualType ObjectType)
Definition: Sema.h:6945
clang::Sema::CFT_Host
@ CFT_Host
Definition: Sema.h:13051
clang::Sema::ImmediateDiagBuilder::ImmediateDiagBuilder
ImmediateDiagBuilder(DiagnosticBuilder &&DB, Sema &SemaRef, unsigned DiagID)
Definition: Sema.h:1706
clang::Sema::OpenMPVarListDataTy::ReductionOrMapperId
DeclarationNameInfo ReductionOrMapperId
Definition: Sema.h:11981
clang::Sema::CUDAFunctionTarget
CUDAFunctionTarget
Definition: Sema.h:13048
clang::Sema::OpenMPVarListDataTy::MapTypeModifiersLoc
SmallVector< SourceLocation, NumberOfOMPMapClauseModifiers > MapTypeModifiersLoc
Definition: Sema.h:11987
clang::LambdaIntroducer
Represents a complete lambda introducer.
Definition: DeclSpec.h:2739
clang::FunctionProtoType::ExceptionSpecInfo::NoexceptExpr
Expr * NoexceptExpr
Noexcept expression, if this is a computed noexcept specification.
Definition: Type.h:4088
clang::Sema::CheckRedeclarationExported
bool CheckRedeclarationExported(NamedDecl *New, NamedDecl *Old)
Definition: SemaDecl.cpp:1695
clang::Sema::MarkVirtualMemberExceptionSpecsNeeded
void MarkVirtualMemberExceptionSpecsNeeded(SourceLocation Loc, const CXXRecordDecl *RD)
Mark the exception specifications of all virtual member functions in the given class as needed.
Definition: SemaDeclCXX.cpp:18080
clang::Sema::NSValueDecl
ObjCInterfaceDecl * NSValueDecl
The declaration of the Objective-C NSValue class.
Definition: Sema.h:1179
clang::Sema::ActOnOpenMPFilterClause
OMPClause * ActOnOpenMPFilterClause(Expr *ThreadID, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'filter' clause.
Definition: SemaOpenMP.cpp:17756
clang::Sema::CodeCompleteDeclSpec
void CodeCompleteDeclSpec(Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
Definition: SemaCodeComplete.cpp:4423
clang::Sema::SubstSpaceshipAsEqualEqual
FunctionDecl * SubstSpaceshipAsEqualEqual(CXXRecordDecl *RD, FunctionDecl *Spaceship)
Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='.
Definition: SemaTemplateInstantiateDecl.cpp:4034
clang::Sema::CanPerformAggregateInitializationForOverloadResolution
bool CanPerformAggregateInitializationForOverloadResolution(const InitializedEntity &Entity, InitListExpr *From)
Determine whether we can perform aggregate initialization for the purposes of overload resolution.
Definition: SemaInit.cpp:3178
clang::Sema::BuildDeclRefExpr
DeclRefExpr * BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
Definition: SemaExpr.cpp:2001
clang::Sema::HandlePropertyInClassExtension
ObjCPropertyDecl * HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind)
Called by ActOnProperty to handle @property declarations in class extensions.
Definition: SemaObjCProperty.cpp:405
clang::Sema::ObjCSuperMessage
@ ObjCSuperMessage
The message is sent to 'super'.
Definition: Sema.h:10443
clang::AttributedType
An attributed type is a type to which a type attribute has been applied.
Definition: Type.h:4878
clang::Sema::ActOnPragmaUnused
void ActOnPragmaUnused(const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
ActOnPragmaUnused - Called on well-formed '#pragma unused'.
Definition: SemaAttr.cpp:842
clang::Sema::SatisfactionStackResetRAII::~SatisfactionStackResetRAII
~SatisfactionStackResetRAII()
Definition: Sema.h:7321
clang::Sema::IsBlockPointerConversion
bool IsBlockPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
Definition: SemaOverload.cpp:2850
clang::Sema::FunctionParamTypesAreEqual
bool FunctionParamTypesAreEqual(const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr, bool Reversed=false)
FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their param...
Definition: SemaOverload.cpp:3070
clang::Sema::pushCodeSynthesisContext
void pushCodeSynthesisContext(CodeSynthesisContext Ctx)
Definition: SemaTemplateInstantiate.cpp:587
clang::Sema::LookupLocalFriendName
@ LookupLocalFriendName
Look up a friend of a local class.
Definition: Sema.h:4323
clang::Sema::IncompatibleBlockPointer
@ IncompatibleBlockPointer
IncompatibleBlockPointer - The assignment is between two block pointers types that are not compatible...
Definition: Sema.h:12425
clang::UnresolvedSetImpl
A set of unresolved declarations.
Definition: UnresolvedSet.h:61
clang::Sema::CheckInstantiatedFunctionTemplateConstraints
bool CheckInstantiatedFunctionTemplateConstraints(SourceLocation PointOfInstantiation, FunctionDecl *Decl, ArrayRef< TemplateArgument > TemplateArgs, ConstraintSatisfaction &Satisfaction)
Definition: SemaConcept.cpp:788
clang::Sema::CXXThisScopeRAII
RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers...
Definition: Sema.h:6644
clang::Sema::SubstParmTypes
bool SubstParmTypes(SourceLocation Loc, ArrayRef< ParmVarDecl * > Params, const FunctionProtoType::ExtParameterInfo *ExtParamInfos, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams, ExtParameterInfoBuilder &ParamInfos)
Substitute the given template arguments into the given set of parameters, producing the set of parame...
Definition: SemaTemplateInstantiate.cpp:2815
clang::SourceLocExpr::IdentKind
IdentKind
Definition: Expr.h:4695
clang::Sema::CheckStaticArrayArgument
void CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
CheckStaticArrayArgument - If the given argument corresponds to a static array parameter,...
Definition: SemaExpr.cpp:6488
clang::Sema::FunctionScopeRAII::FunctionScopeRAII
FunctionScopeRAII(Sema &S)
Definition: Sema.h:5049
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::isEqual
static bool isEqual(const FunctionDeclAndLoc &LHS, const FunctionDeclAndLoc &RHS)
Definition: Sema.h:14006
clang::Sema::OS_Array
@ OS_Array
Definition: Sema.h:3944
clang::Sema::TypoDiagnosticGenerator
std::function< void(const TypoCorrection &)> TypoDiagnosticGenerator
Definition: Sema.h:4392
clang::Sema::BuildCoroutineBodyStmt
StmtResult BuildCoroutineBodyStmt(CoroutineBodyStmt::CtorArgs)
Definition: SemaCoroutine.cpp:1837
clang::Sema::ActOnCXXTryBlock
StmtResult ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers)
ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statemen...
Definition: SemaStmt.cpp:4439
clang::Sema::isMemberAccessibleForDeletion
bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType)
Definition: Sema.h:7917
clang::Sema::TypeDiagnoser
Abstract class used to diagnose incomplete types.
Definition: Sema.h:2172
clang::Sema::ActOnParenListExpr
ExprResult ActOnParenListExpr(SourceLocation L, SourceLocation R, MultiExprArg Val)
Definition: SemaExpr.cpp:8342
clang::Sema::CallingConventionIgnoredReason::ForThisTarget
@ ForThisTarget
clang::Sema::ActOnOpenMPExclusiveClause
OMPClause * ActOnOpenMPExclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'exclusive' clause.
Definition: SemaOpenMP.cpp:23600
clang::Sema::BuildResolvedCoawaitExpr
ExprResult BuildResolvedCoawaitExpr(SourceLocation KwLoc, Expr *Operand, Expr *Awaiter, bool IsImplicit=false)
Definition: SemaCoroutine.cpp:873
clang::Sema::CheckMessageArgumentTypes
bool CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK)
CheckMessageArgumentTypes - Check types in an Obj-C message send.
Definition: SemaExprObjC.cpp:1710
clang::Sema::FunctionVoidPointer
@ FunctionVoidPointer
FunctionVoidPointer - The assignment is between a function pointer and void*, which the standard does...
Definition: Sema.h:12371
clang::Sema::inferGslOwnerPointerAttribute
void inferGslOwnerPointerAttribute(CXXRecordDecl *Record)
Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.
Definition: SemaAttr.cpp:167
clang::Sema::NSStringDecl
ObjCInterfaceDecl * NSStringDecl
The declaration of the Objective-C NSString class.
Definition: Sema.h:1191
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:210
clang::Sema::ActOnUsingDirective
Decl * ActOnUsingDirective(Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList)
Definition: SemaDeclCXX.cpp:11743
clang::Sema::AlignPackInfo::IsXLStack
bool IsXLStack() const
Definition: Sema.h:558
clang::Sema::stripARCUnbridgedCast
Expr * stripARCUnbridgedCast(Expr *e)
stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.
Definition: SemaExprObjC.cpp:4539
clang::Sema::InventedParameterInfosStart
unsigned InventedParameterInfosStart
The index of the first InventedParameterInfo that refers to the current context.
Definition: Sema.h:825
clang::Sema::CodeCompleteCase
void CodeCompleteCase(Scope *S)
Definition: SemaCodeComplete.cpp:5897
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:23
clang::Sema::hasReachableExplicitSpecialization
bool hasReachableExplicitSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a reachable declaration of D that is an explicit specialization declaration for...
Definition: SemaLookup.cpp:1725
clang::Sema::ActOnGNUNullExpr
ExprResult ActOnGNUNullExpr(SourceLocation TokenLoc)
Definition: SemaExpr.cpp:16934
clang::Sema::ActOnEndOfTranslationUnit
void ActOnEndOfTranslationUnit()
ActOnEndOfTranslationUnit - This is called at the very end of the translation unit when EOF is reache...
Definition: Sema.cpp:1097
clang::Sema::AllowFoldKind
AllowFoldKind
Definition: Sema.h:12906
clang::Sema::ActOnDuplicateDefinition
bool ActOnDuplicateDefinition(Decl *Prev, SkipBodyInfo &SkipBody)
Perform ODR-like check for C/ObjC when merging tag types from modules.
Definition: SemaDecl.cpp:17581
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1389
clang::Sema::AbstractNone
@ AbstractNone
Definition: Sema.h:7936
clang::Sema::mergeAvailabilityAttr
AvailabilityAttr * mergeAvailabilityAttr(NamedDecl *D, const AttributeCommonInfo &CI, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority)
Attribute merging methods. Return true if a new attribute was added.
Definition: SemaDeclAttr.cpp:2430
clang::Sema::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope
void ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(Decl *D, SmallVectorImpl< FunctionDecl * > &Bases)
Register D as specialization of all base functions in Bases in the current omp begin/end declare vari...
Definition: SemaOpenMP.cpp:7220
clang::Sema::RequireNonAbstractType
bool RequireNonAbstractType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:7950
clang::Sema::getFixItZeroLiteralForType
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const
Definition: SemaFixItUtils.cpp:223
clang::Sema::ActOnOpenMPRequiresDirective
DeclGroupPtrTy ActOnOpenMPRequiresDirective(SourceLocation Loc, ArrayRef< OMPClause * > ClauseList)
Called on well-formed '#pragma omp requires'.
Definition: SemaOpenMP.cpp:3451
clang::Sema::CheckExtVectorCast
ExprResult CheckExtVectorCast(SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
Definition: SemaExpr.cpp:8132
clang::Sema::ActOnSimpleRequirement
concepts::Requirement * ActOnSimpleRequirement(Expr *E)
Definition: SemaExprCXX.cpp:8929
clang::Sema::CallingConventionIgnoredReason::BuiltinFunction
@ BuiltinFunction
clang::Sema::ActOnOpenMPFullClause
OMPClause * ActOnOpenMPFullClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-form 'full' clauses.
Definition: SemaOpenMP.cpp:16966
clang::Sema::ActOnCXXBoolLiteral
ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnCXXBoolLiteral - Parse {true,false} literals.
Definition: SemaExprCXX.cpp:811
OpenCLOptions.h
clang::Sema::ConvertMemberDefaultInitExpression
ExprResult ConvertMemberDefaultInitExpression(FieldDecl *FD, Expr *InitExpr, SourceLocation InitLoc)
Definition: SemaDeclCXX.cpp:4060
clang::sema::AnalysisBasedWarnings
Definition: AnalysisBasedWarnings.h:31
clang::interp::Comp
bool Comp(InterpState &S, CodePtr OpPC)
1) Pops the value from the stack.
Definition: Interp.h:525
clang::Sema::TyposCorrected
unsigned TyposCorrected
The number of typos corrected by CorrectTypo.
Definition: Sema.h:9797
clang::CXXConversionDecl
Represents a C++ conversion function within a class.
Definition: DeclCXX.h:2778
clang::Sema::ActOnEnumConstant
Decl * ActOnEnumConstant(Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val)
Definition: SemaDecl.cpp:19297
clang::Sema::UPPC_IfNotExists
@ UPPC_IfNotExists
Microsoft __if_not_exists.
Definition: Sema.h:8642
clang::Sema::FST_Unknown
@ FST_Unknown
Definition: Sema.h:13575
clang::Sema::ActOnStartLinkageSpecification
Decl * ActOnStartLinkageSpecification(Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification,...
Definition: SemaDeclCXX.cpp:16342
clang::Sema::hasReachableDeclarationSlow
bool hasReachableDeclarationSlow(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Definition: SemaLookup.cpp:2044
clang::Sema::ActOnLambdaExplicitTemplateParameterList
void ActOnLambdaExplicitTemplateParameterList(SourceLocation LAngleLoc, ArrayRef< NamedDecl * > TParams, SourceLocation RAngleLoc, ExprResult RequiresClause)
This is called after parsing the explicit template parameter list on a lambda (if it exists) in C++2a...
Definition: SemaLambda.cpp:530
clang::TypoCorrection
Simple class containing the result of Sema::CorrectTypo.
Definition: TypoCorrection.h:42
clang::Sema::ContextualImplicitConverter::diagnoseConversion
virtual SemaDiagnosticBuilder diagnoseConversion(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
Emits a diagnostic when we picked a conversion function (for cases when we are not allowed to pick a ...
Data
const char * Data
Definition: StandardLibrary.cpp:35
clang::Sema::AMK_Override
@ AMK_Override
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
Definition: Sema.h:3600
clang::Sema::DelayedDiagnostics::DelayedDiagnostics
DelayedDiagnostics()
Definition: Sema.h:954
clang::Sema::ActOnOpenMPTargetDirective
StmtResult ActOnOpenMPTargetDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12955
clang::Sema::ActOnPragmaMSInitSeg
void ActOnPragmaMSInitSeg(SourceLocation PragmaLocation, StringLiteral *SegmentName)
Called on well-formed #pragma init_seg().
Definition: SemaAttr.cpp:797
clang::Sema::DiagnoseMultipleUserDefinedConversion
bool DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType)
Definition: SemaOverload.cpp:3744
clang::Sema::UPPC_DeclarationType
@ UPPC_DeclarationType
The type of an arbitrary declaration.
Definition: Sema.h:8597
clang::Sema::ActOnParamDefaultArgument
void ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *defarg)
ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is w...
Definition: SemaDeclCXX.cpp:322
clang::Sema::getIdentityTemplateArgumentLoc
TemplateArgumentLoc getIdentityTemplateArgumentLoc(NamedDecl *Param, SourceLocation Location)
Get a template argument mapping the given template parameter to itself, e.g.
Definition: SemaTemplateDeduction.cpp:2606
clang::Sema::DiagnoseSentinelCalls
void DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args)
DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with t...
Definition: SemaExpr.cpp:406
clang::Sema::isOpenMPTargetCapturedDecl
bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified variable is captured by 'target' directive.
Definition: SemaOpenMP.cpp:2637
clang::Sema::ActOnObjCContainerStartDefinition
void ActOnObjCContainerStartDefinition(ObjCContainerDecl *IDecl)
Definition: SemaDecl.cpp:17590
clang::Sema::DeclareImplicitMoveConstructor
CXXConstructorDecl * DeclareImplicitMoveConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit move constructor for the given class.
Definition: SemaDeclCXX.cpp:15295
clang::Sema::MarkMemberReferenced
void MarkMemberReferenced(MemberExpr *E)
Perform reference-marking and odr-use handling for a MemberExpr.
Definition: SemaExpr.cpp:20001
clang::Sema::CheckFloatComparison
void CheckFloatComparison(SourceLocation Loc, Expr *LHS, Expr *RHS, BinaryOperatorKind Opcode)
Check for comparisons of floating-point values using == and !=.
Definition: SemaChecking.cpp:12191
clang::Sema::CurInitSeg
StringLiteral * CurInitSeg
Last section used with #pragma init_seg.
Definition: Sema.h:732
clang::Sema::LookupInstanceMethodInGlobalPool
ObjCMethodDecl * LookupInstanceMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition: Sema.h:4951
clang::ObjCImplementationDecl
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2584
clang::Sema::getASTContext
ASTContext & getASTContext() const
Definition: Sema.h:1662
clang::Sema::DeclApplyPragmaWeak
void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, const WeakInfo &W)
DeclApplyPragmaWeak - A declaration (maybe definition) needs #pragma weak applied to it,...
Definition: SemaDeclAttr.cpp:9548
clang::OverloadCandidateParamOrder
OverloadCandidateParamOrder
The parameter ordering that will be used for the candidate.
Definition: Overload.h:84
clang::Sema::LookupCopyingAssignment
CXXMethodDecl * LookupCopyingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the copying assignment operator for the given class.
Definition: SemaLookup.cpp:3593
clang::Sema::isOpenMPCapturedDecl
VarDecl * isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo=false, unsigned StopAt=0)
Check if the specified variable is used in one of the private clauses (private, firstprivate,...
Definition: SemaOpenMP.cpp:2327
clang::Sema::FnBodyKind
FnBodyKind
Definition: Sema.h:3054
clang::Sema::NTCUC_Assignment
@ NTCUC_Assignment
Definition: Sema.h:3003
clang::Sema::ActOnFinishCXXNonNestedClass
void ActOnFinishCXXNonNestedClass()
Definition: SemaDeclCXX.cpp:13945
clang::Sema::BFRK_Build
@ BFRK_Build
Initial building of a for-range statement.
Definition: Sema.h:5118
clang::Sema::FreeVisContext
void FreeVisContext()
FreeVisContext - Deallocate and null out VisContext.
Definition: SemaAttr.cpp:1259
clang::Sema::ActOnOpenMPSafelenClause
OMPClause * ActOnOpenMPSafelenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'safelen' clause.
Definition: SemaOpenMP.cpp:16486
clang::Sema::getCurFunction
sema::FunctionScopeInfo * getCurFunction() const
Definition: Sema.h:1987
clang::Sema::InstantiateVariableDefinition
void InstantiateVariableDefinition(SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
Instantiate the definition of the given variable from its template.
Definition: SemaTemplateInstantiateDecl.cpp:5406
clang::Sema::SemaDiagnosticBuilder::Kind
Kind
Definition: Sema.h:1772
clang::Sema::CheckAddressOfOperand
QualType CheckAddressOfOperand(ExprResult &Operand, SourceLocation OpLoc)
CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designatin...
Definition: SemaExpr.cpp:14529
clang::Sema::ActOnOpenMPDetachClause
OMPClause * ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'detach' clause.
Definition: SemaOpenMP.cpp:22657
clang::Sema::ActOnOpenMPNovariantsClause
OMPClause * ActOnOpenMPNovariantsClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'novariants' clause.
Definition: SemaOpenMP.cpp:17694
clang::Sema::getTrivialTemplateArgumentLoc
TemplateArgumentLoc getTrivialTemplateArgumentLoc(const TemplateArgument &Arg, QualType NTTPType, SourceLocation Loc)
Allocate a TemplateArgumentLoc where all locations have been initialized to the given location.
Definition: SemaTemplateDeduction.cpp:2544
clang::Sema::SourceMgr
SourceManager & SourceMgr
Definition: Sema.h:412
clang::TemplateNameKind
TemplateNameKind
Specifies the kind of template name that an identifier refers to.
Definition: TemplateKinds.h:20
clang::Sema::AreConstraintExpressionsEqual
bool AreConstraintExpressionsEqual(const NamedDecl *Old, const Expr *OldConstr, const NamedDecl *New, const Expr *NewConstr)
Definition: SemaConcept.cpp:711
clang::Sema::OSMK_New
@ OSMK_New
Definition: Sema.h:10380
clang::Sema::AddKnownFunctionAttributes
void AddKnownFunctionAttributes(FunctionDecl *FD)
Adds any function attributes that we know a priori based on the declaration of this function.
Definition: SemaDecl.cpp:16064
clang::Sema::ActOnOpenMPTaskReductionClause
OMPClause * ActOnOpenMPTaskReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
Called on well-formed 'task_reduction' clause.
Definition: SemaOpenMP.cpp:19847
clang::Sema::handleDelayedAvailabilityCheck
void handleDelayedAvailabilityCheck(sema::DelayedDiagnostic &DD, Decl *Ctx)
Definition: SemaAvailability.cpp:546
clang::OpenMPAtClauseKind
OpenMPAtClauseKind
OpenMP attributes for 'at' clause.
Definition: OpenMPKinds.h:135
clang::Sema::NTCUC_LValueToRValueVolatile
@ NTCUC_LValueToRValueVolatile
Definition: Sema.h:3009
clang::Sema::ThreadSafetyDeclCache
threadSafety::BeforeSet * ThreadSafetyDeclCache
Definition: Sema.h:9809
clang::Sema::DataSegStack
PragmaStack< StringLiteral * > DataSegStack
Definition: Sema.h:695
clang::Sema::ActOnCXXTypeid
ExprResult ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXTypeid - Parse typeid( something ).
Definition: SemaExprCXX.cpp:644
clang::Sema::ActOnOpenMPFromClause
OMPClause * ActOnOpenMPFromClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
Called on well-formed 'from' clause.
Definition: SemaOpenMP.cpp:23115
clang::Sema::OpenMPVarListDataTy::IteratorExpr
Expr * IteratorExpr
Definition: Sema.h:11977
clang::Sema::CodeCompleteObjCProtocolReferences
void CodeCompleteObjCProtocolReferences(ArrayRef< IdentifierLocPair > Protocols)
Definition: SemaCodeComplete.cpp:8383
clang::Sema::CheckVariableDeclarationType
void CheckVariableDeclarationType(VarDecl *NewVD)
Definition: SemaDecl.cpp:8453
clang::Sema::BuildCoreturnStmt
StmtResult BuildCoreturnStmt(SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
Definition: SemaCoroutine.cpp:980
clang::Sema::AddInstanceMethodToGlobalPool
void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool...
Definition: Sema.h:4936
clang::Sema::isMicrosoftMissingTypename
bool isMicrosoftMissingTypename(const CXXScopeSpec *SS, Scope *S)
isMicrosoftMissingTypename - In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal...
Definition: SemaDecl.cpp:704
clang::Sema::ICEConvertDiagnoser::ICEConvertDiagnoser
ICEConvertDiagnoser(bool AllowScopedEnumerations, bool Suppress, bool SuppressConversion)
Definition: Sema.h:3919
clang::Sema::checkNonTrivialCUnionInInitializer
void checkNonTrivialCUnionInInitializer(const Expr *Init, SourceLocation Loc)
Emit diagnostics if the initializer or any of its explicit or implicitly-generated subexpressions req...
Definition: SemaDecl.cpp:12728
clang::Sema::OSMK_Alloc
@ OSMK_Alloc
Definition: Sema.h:10379
clang::Sema::checkDeclIsAllowedInOpenMPTarget
void checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, SourceLocation IdLoc=SourceLocation())
Check declaration inside target region.
Definition: SemaOpenMP.cpp:23007
clang::ExternalSemaSource::ReadDelegatingConstructors
virtual void ReadDelegatingConstructors(SmallVectorImpl< CXXConstructorDecl * > &Decls)
Read the set of delegating constructors known to the external Sema source.
Definition: ExternalSemaSource.h:125
clang::Sema::DiagnoseSwiftName
bool DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync)
Do a check to make sure Name looks like a legal argument for the swift_name attribute applied to decl...
Definition: SemaDeclAttr.cpp:6653
clang::Sema::CXXTypeInfoDecl
RecordDecl * CXXTypeInfoDecl
The C++ "type_info" declaration, which is defined in <typeinfo>.
Definition: Sema.h:1163
clang::Sema::ActOnDecltypeExpression
ExprResult ActOnDecltypeExpression(Expr *E)
Process the expression contained within a decltype.
Definition: SemaExprCXX.cpp:7374
clang::Sema::NameClassification::OverloadSet
static NameClassification OverloadSet(ExprResult E)
Definition: Sema.h:2690
clang::Sema::AlignPackInfo::IsPackSet
bool IsPackSet() const
Definition: Sema.h:552
clang::Sema::CTK_NonError
@ CTK_NonError
Definition: Sema.h:4525
clang::Sema::ArgumentPackSubstitutionIndex
int ArgumentPackSubstitutionIndex
The current index into pack expansion arguments that will be used for substitution of parameter packs...
Definition: Sema.h:9424
clang::Sema::ActOnPragmaMSSeg
void ActOnPragmaMSSeg(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
Definition: SemaAttr.cpp:754
clang::Sema::NameClassification::NameClassification
NameClassification(const IdentifierInfo *Keyword)
Definition: Sema.h:2680
clang::Sema::VariadicMethod
@ VariadicMethod
Definition: Sema.h:12274
clang::Sema::DiagnoseStaticAssertDetails
void DiagnoseStaticAssertDetails(const Expr *E)
Try to print more useful information about a failed static_assert with expression \E.
Definition: SemaDeclCXX.cpp:16725
clang::UsingDirectiveDecl
Represents C++ using-directive.
Definition: DeclCXX.h:2929
clang::Sema::OS_Error
@ OS_Error
Definition: Sema.h:3946
clang::Sema::BuildDependentDeclRefExpr
ExprResult BuildDependentDeclRefExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:772
clang::Sema::checkCUDATargetOverload
void checkCUDATargetOverload(FunctionDecl *NewFD, const LookupResult &Previous)
Check whether NewFD is a valid overload for CUDA.
Definition: SemaCUDA.cpp:903
clang::Sema::ExpressionEvaluationContext::UnevaluatedAbstract
@ UnevaluatedAbstract
The current expression occurs within an unevaluated operand that unconditionally permits abstract ref...
clang::Sema::ActOnIdExpression
ExprResult ActOnIdExpression(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr)
Definition: SemaExpr.cpp:2485
clang::Sema::DeduceAutoType
TemplateDeductionResult DeduceAutoType(TypeLoc AutoTypeLoc, Expr *Initializer, QualType &Result, sema::TemplateDeductionInfo &Info, bool DependentDeduction=false, bool IgnoreConstraints=false)
Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)
Definition: SemaTemplateDeduction.cpp:4703
clang::Sema::ActOnCXXExitDeclInitializer
void ActOnCXXExitDeclInitializer(Scope *S, Decl *Dcl)
ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaratio...
Definition: SemaDeclCXX.cpp:17868
clang::Sema::getPrintable
static DeclarationName getPrintable(DeclarationName N)
Definition: Sema.h:2188
clang::Sema::RequireCompleteDeclContext
bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC)
Require that the context specified by SS be complete.
Definition: SemaCXXScopeSpec.cpp:199
clang::Sema::LookupFactoryMethodInGlobalPool
ObjCMethodDecl * LookupFactoryMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition: Sema.h:4959
clang::Sema::MergeVarDeclExceptionSpecs
void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old)
Merge the exception specifications of two variable declarations.
Definition: SemaDeclCXX.cpp:1578
clang::Sema::ObjCSpecialMethodKind
ObjCSpecialMethodKind
Definition: Sema.h:10377
clang::Sema::ConvertArgumentsForCall
bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false)
ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of ...
Definition: SemaExpr.cpp:6249
clang::Sema::NoteDeletedFunction
void NoteDeletedFunction(FunctionDecl *FD)
Emit a note explaining that this function is deleted.
Definition: SemaExpr.cpp:115
clang::BindingDecl
A binding in a decomposition declaration.
Definition: DeclCXX.h:4020
clang::Sema::CallExprUnaryConversions
ExprResult CallExprUnaryConversions(Expr *E)
CallExprUnaryConversions - a special case of an unary conversion performed on a function designator o...
Definition: SemaExpr.cpp:752
clang::Sema::AreMultipleMethodsInGlobalPool
bool AreMultipleMethodsInGlobalPool(Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass, SmallVectorImpl< ObjCMethodDecl * > &Methods)
Definition: SemaDeclObjC.cpp:3551
clang::Sema::AddNonMemberOperatorCandidates
void AddNonMemberOperatorCandidates(const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
Add all of the non-member operator function declarations in the given function set to the overload ca...
Definition: SemaOverload.cpp:7821
clang::Sema::forRedeclarationInCurContext
RedeclarationKind forRedeclarationInCurContext()
Definition: Sema.h:4351
clang::Sema::currentModuleIsInterface
bool currentModuleIsInterface() const
Is the module scope we are an interface?
Definition: Sema.h:2328
clang::Sema::DeclClonePragmaWeak
NamedDecl * DeclClonePragmaWeak(NamedDecl *ND, const IdentifierInfo *II, SourceLocation Loc)
DeclClonePragmaWeak - clone existing decl (maybe definition), #pragma weak needs a non-definition dec...
Definition: SemaDeclAttr.cpp:9502
clang::Sema::ActOnPragmaFloatControl
void ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value)
ActOnPragmaFloatControl - Call on well-formed #pragma float_control.
Definition: SemaAttr.cpp:551
clang::Sema::actOnObjCTypeParam
DeclResult actOnObjCTypeParam(Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound)
Definition: SemaDeclObjC.cpp:666
clang::Sema::ActOnOpenMPTargetParallelGenericLoopDirective
StmtResult ActOnOpenMPTargetParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10722
clang::Sema::ActOnRequiresExpr
ExprResult ActOnRequiresExpr(SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, ArrayRef< ParmVarDecl * > LocalParameters, ArrayRef< concepts::Requirement * > Requirements, SourceLocation ClosingBraceLoc)
Definition: SemaExprCXX.cpp:9137
clang::Sema::LOLR_StringTemplatePack
@ LOLR_StringTemplatePack
The lookup found an overload set of literal operator templates, which expect the character type and c...
Definition: Sema.h:4381
clang::Sema::CheckOverridingFunctionExceptionSpec
bool CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.
Definition: SemaExceptionSpec.cpp:961
clang::Sema::InventedParameterInfos
SmallVector< InventedTemplateParameterInfo, 4 > InventedParameterInfos
Stack containing information needed when in C++2a an 'auto' is encountered in a function declaration ...
Definition: Sema.h:821
llvm::SmallVector
Definition: LLVM.h:35
clang::Sema::ACR_unbridged
@ ACR_unbridged
Definition: Sema.h:12731
clang::Sema::UsesAllocatorsData::Allocator
Expr * Allocator
Allocator.
Definition: Sema.h:12171
clang::Sema::ActOnBreakStmt
StmtResult ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope)
Definition: SemaStmt.cpp:3344
clang::Sema::PushForceCUDAHostDevice
void PushForceCUDAHostDevice()
Increments our count of the number of times we've seen a pragma forcing functions to be host device.
Definition: SemaCUDA.cpp:37
clang::Sema::BoundTypeDiagnoser::DiagID
unsigned DiagID
Definition: Sema.h:2197
clang::Sema::getFixItZeroInitializerForType
std::string getFixItZeroInitializerForType(QualType T, SourceLocation Loc) const
Get a string to suggest for zero-initialization of a type.
Definition: SemaFixItUtils.cpp:204
clang::Sema::CFP_WrongSide
@ CFP_WrongSide
Definition: Sema.h:13085
clang::Sema::isObjCWritebackConversion
bool isObjCWritebackConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
Determine whether this is an Objective-C writeback conversion, used for parameter passing when perfor...
Definition: SemaOverload.cpp:2792
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::Sema::ModuleDeclKind::Interface
@ Interface
'export module X;'
clang::Sema::ActOnOpenMPDeclareReductionType
QualType ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare reduction' construct.
Definition: SemaOpenMP.cpp:22070
clang::Sema::OriginalCallArg::DecomposedParam
bool DecomposedParam
Definition: Sema.h:9037
clang::Sema::CodeSynthesisContext::ParameterMappingSubstitution
@ ParameterMappingSubstitution
Definition: Sema.h:9272
clang::Sema::FunctionScopes
SmallVector< sema::FunctionScopeInfo *, 4 > FunctionScopes
Stack containing information about each of the nested function, block, and method scopes that are cur...
Definition: Sema.h:805
clang::Sema::BuildObjCDictionaryLiteral
ExprResult BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef< ObjCDictionaryElement > Elements)
Definition: SemaExprObjC.cpp:954
clang::Sema::InvalidLogicalVectorOperands
QualType InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
Definition: SemaExpr.cpp:10376
clang::Sema::CodeSynthesisContext::PointOfInstantiation
SourceLocation PointOfInstantiation
The point of instantiation or synthesis within the source code.
Definition: Sema.h:9298
clang::Sema::ActOnCXXForRangeDecl
void ActOnCXXForRangeDecl(Decl *D)
Definition: SemaDecl.cpp:13813
clang::Sema::ActOnBinOp
ExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc, tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr)
Definition: SemaExpr.cpp:15574
clang::Sema::CheckFriendAccess
AccessResult CheckFriendAccess(NamedDecl *D)
Checks access to the target of a friend declaration.
Definition: SemaAccess.cpp:1808
clang::Sema::ActOnPragmaDetectMismatch
void ActOnPragmaDetectMismatch(SourceLocation Loc, StringRef Name, StringRef Value)
ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
Definition: SemaAttr.cpp:516
clang::Sema::targetDiag
SemaDiagnosticBuilder targetDiag(SourceLocation Loc, const PartialDiagnostic &PD, FunctionDecl *FD=nullptr)
Definition: Sema.h:13038
clang::OMPThreadPrivateDecl
This represents '#pragma omp threadprivate ...' directive.
Definition: DeclOpenMP.h:110
clang::Sema::ActOnStartCXXMemberReference
ExprResult ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
Definition: SemaExprCXX.cpp:7507
clang::ImplicitTypenameContext
ImplicitTypenameContext
Definition: DeclSpec.h:1817
clang::Sema::CodeSegStack
PragmaStack< StringLiteral * > CodeSegStack
Definition: Sema.h:698
clang::Sema::OpenMPVarListDataTy::OmpAllMemoryLoc
SourceLocation OmpAllMemoryLoc
Definition: Sema.h:11993
clang::Sema::ActOnObjCContainerFinishDefinition
void ActOnObjCContainerFinishDefinition()
Definition: SemaDecl.cpp:17696
clang::Sema::SizelessTypeDiagnoser::SizelessTypeDiagnoser
SizelessTypeDiagnoser(unsigned DiagID, const Ts &... Args)
Definition: Sema.h:2238
clang::TNK_Undeclared_template
@ TNK_Undeclared_template
Lookup for the name failed, but we're assuming it was a template name anyway.
Definition: TemplateKinds.h:50
clang::Sema::ActOnFinishFullStmt
StmtResult ActOnFinishFullStmt(Stmt *Stmt)
Definition: SemaExprCXX.cpp:8873
clang::Sema::SpecialMemberOverloadResult::NoMemberOrDeleted
@ NoMemberOrDeleted
Definition: Sema.h:1425
clang::Sema::AddPushedVisibilityAttribute
void AddPushedVisibilityAttribute(Decl *RD)
AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility at...
Definition: SemaAttr.cpp:1239
clang::Sema::AnalysisWarnings
sema::AnalysisBasedWarnings AnalysisWarnings
Worker object for performing CFG-based warnings.
Definition: Sema.h:9808
clang::Sema::AtomicPropertySetterGetterRules
void AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property h...
Definition: SemaObjCProperty.cpp:2163
clang::Sema::isReachable
bool isReachable(const NamedDecl *D)
Determine whether a declaration is reachable.
Definition: Sema.h:2369
clang::Sema::PragmaStack::Slot
Definition: Sema.h:596
clang::Sema::CheckLookupAccess
void CheckLookupAccess(const LookupResult &R)
Checks access to all the declarations in the given result set.
Definition: SemaAccess.cpp:1898
clang::Sema::ActOnOpenMPParallelDirective
StmtResult ActOnOpenMPParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:7734
clang::Sema::AddModeAttr
void AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation=false)
AddModeAttr - Adds a mode attribute to a particular declaration.
Definition: SemaDeclAttr.cpp:4649
clang::Sema::CompleteMemberSpecialization
void CompleteMemberSpecialization(NamedDecl *Member, LookupResult &Previous)
Definition: SemaTemplate.cpp:9741
clang::Sema::CheckMSVCRTEntryPoint
void CheckMSVCRTEntryPoint(FunctionDecl *FD)
Definition: SemaDecl.cpp:12128
clang::Sema::ContextualImplicitConverter::Suppress
bool Suppress
Definition: Sema.h:3869
clang::Sema::LookupOverloadedOperatorName
void LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S, UnresolvedSetImpl &Functions)
Definition: SemaLookup.cpp:3307
clang::Sema::DiagnoseClassExtensionDupMethods
void DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension...
Definition: SemaDeclObjC.cpp:1765
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:247
clang::Sema::UseArgumentDependentLookup
bool UseArgumentDependentLookup(const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
Definition: SemaExpr.cpp:3135
clang::Sema::getEnclosingFunction
sema::FunctionScopeInfo * getEnclosingFunction() const
Definition: Sema.cpp:2318
clang::Sema::DiagnoseAutoDeductionFailure
void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init)
Definition: SemaTemplateDeduction.cpp:4910
AllowedExplicit
Sema::AllowedExplicit AllowedExplicit
Definition: SemaOverload.cpp:47
clang::Sema::TemporaryMaterializationConversion
ExprResult TemporaryMaterializationConversion(Expr *E)
If E is a prvalue denoting an unmaterialized temporary, materialize it as an xvalue.
Definition: SemaInit.cpp:8255
clang::Sema::Ref_Related
@ Ref_Related
Ref_Related - The two types are reference-related, which means that their unqualified forms (T1 and T...
Definition: Sema.h:12660
clang::Sema::AttachTypeConstraint
bool AttachTypeConstraint(NestedNameSpecifierLoc NS, DeclarationNameInfo NameInfo, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
Attach a type-constraint to a template parameter.
Definition: SemaTemplate.cpp:1218
clang::Sema::ExpressionEvaluationContextRecord::DelayedDefaultInitializationContext
std::optional< InitializationContext > DelayedDefaultInitializationContext
Definition: Sema.h:1356
clang::Sema::RequireLiteralType
bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2542
clang::Sema::ActOnOpenMPSeverityClause
OMPClause * ActOnOpenMPSeverityClause(OpenMPSeverityClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'severity' clause.
Definition: SemaOpenMP.cpp:16861
clang::Sema::PrepareScalarCast
CastKind PrepareScalarCast(ExprResult &src, QualType destType)
Prepares for a scalar cast, performing all the necessary stages except the final cast and returning t...
Definition: SemaExpr.cpp:7697
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::getHashValue
static unsigned getHashValue(const FunctionDeclAndLoc &FDL)
Definition: Sema.h:14001
clang::Sema::VerifyIntegerConstantExpression
ExprResult VerifyIntegerConstantExpression(Expr *E, AllowFoldKind CanFold=NoFold)
Definition: Sema.h:12923
clang::Sema::DiagnoseSelfMove
void DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc)
Warn if a value is moved to itself.
Definition: SemaChecking.cpp:17143
clang::Sema::SpecialMemberOverloadResult::SpecialMemberOverloadResult
SpecialMemberOverloadResult(CXXMethodDecl *MD)
Definition: Sema.h:1435
clang::Sema::ActOnNameClassifiedAsDependentNonType
ExprResult ActOnNameClassifiedAsDependentNonType(const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, bool IsAddressOfOperand)
Act on the result of classifying a name as an undeclared member of a dependent base class.
Definition: SemaDecl.cpp:1273
clang::Sema::CheckMultiplyDivideOperands
QualType CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide)
Definition: SemaExpr.cpp:11051
clang::Sema::SatisfactionStackResetRAII
Definition: Sema.h:7311
clang::Sema::ComparisonCategoryUsage
ComparisonCategoryUsage
Definition: Sema.h:6113
clang::TNK_Function_template
@ TNK_Function_template
The name refers to a function template or a set of overloaded functions that includes at least one fu...
Definition: TemplateKinds.h:26
clang::Sema::DiagnoseUnterminatedPragmaAttribute
void DiagnoseUnterminatedPragmaAttribute()
Definition: SemaAttr.cpp:1153
clang::Sema::findMacroSpelling
bool findMacroSpelling(SourceLocation &loc, StringRef name)
Looks through the macro-expansion chain for the given location, looking for a macro expansion with th...
Definition: Sema.cpp:2070
clang::Sema::UPPC_Requirement
@ UPPC_Requirement
Definition: Sema.h:8654
clang::Sema::FindUsualDeallocationFunction
FunctionDecl * FindUsualDeallocationFunction(SourceLocation StartLoc, bool CanProvideSize, bool Overaligned, DeclarationName Name)
Definition: SemaExprCXX.cpp:3209
clang::Sema::findInheritingConstructor
CXXConstructorDecl * findInheritingConstructor(SourceLocation Loc, CXXConstructorDecl *BaseCtor, ConstructorUsingShadowDecl *DerivedShadow)
Given a derived-class using shadow declaration for a constructor and the correspnding base class cons...
Definition: SemaDeclCXX.cpp:13632
clang::Sema::shouldSkipAnonEnumBody
SkipBodyInfo shouldSkipAnonEnumBody(Scope *S, IdentifierInfo *II, SourceLocation IILoc)
Determine whether the body of an anonymous enumeration should be skipped.
Definition: SemaDecl.cpp:19271
IdentifierResolver.h
clang::Sema::NonTrivialCUnionContext
NonTrivialCUnionContext
Definition: Sema.h:2991
clang::Sema::ObjCArgInfo::Name
IdentifierInfo * Name
Definition: Sema.h:10387
clang::Sema::FindInstantiatedDecl
NamedDecl * FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext=false)
Find the instantiation of the given declaration within the current instantiation.
Definition: SemaTemplateInstantiateDecl.cpp:6024
clang::Sema::PragmaStack::Stack
SmallVector< Slot, 2 > Stack
Definition: Sema.h:669
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo(AlignPackInfo::Mode M, unsigned Num, bool IsXL)
Definition: Sema.h:500
clang::Sema::isMoreSpecializedThanPrimary
bool isMoreSpecializedThanPrimary(ClassTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info)
Definition: SemaTemplateDeduction.cpp:5686
clang::Sema::IsStringLiteralToNonConstPointerConversion
bool IsStringLiteralToNonConstPointerConversion(Expr *From, QualType ToType)
Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to...
Definition: SemaExprCXX.cpp:4060
clang::Sema::IsFloatingPointPromotion
bool IsFloatingPointPromotion(QualType FromType, QualType ToType)
IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating po...
Definition: SemaOverload.cpp:2332
clang::Sema::DefineInheritingConstructor
void DefineInheritingConstructor(SourceLocation UseLoc, CXXConstructorDecl *Constructor)
Define the specified inheriting constructor.
Definition: SemaDeclCXX.cpp:13722
clang::Sema::FunctionDeclAndLoc::FD
CanonicalDeclPtr< FunctionDecl > FD
Definition: Sema.h:12958
clang::Sema::ExpressionEvaluationContextRecord::isUnevaluated
bool isUnevaluated() const
Definition: Sema.h:1368
clang::Sema::ActOnFinishSEHFinallyBlock
StmtResult ActOnFinishSEHFinallyBlock(SourceLocation Loc, Stmt *Block)
Definition: SemaStmt.cpp:4593
clang::Sema::ActOnMemInitializers
void ActOnMemInitializers(Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors)
ActOnMemInitializers - Handle the member initializers for a constructor.
Definition: SemaDeclCXX.cpp:5584
clang::Sema::FpPragmaStack
PragmaStack< FPOptionsOverride > FpPragmaStack
Definition: Sema.h:704
clang::Sema::FindCompositeObjCPointerType
QualType FindCompositeObjCPointerType(ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types ...
Definition: SemaExpr.cpp:9029
clang::Sema::isCheckingDefaultArgumentOrInitializer
bool isCheckingDefaultArgumentOrInitializer() const
Definition: Sema.h:9688
clang::Sema::checkSectionName
bool checkSectionName(SourceLocation LiteralLoc, StringRef Str)
Definition: SemaDeclAttr.cpp:3311
clang::Sema::ResolveSingleFunctionTemplateSpecialization
FunctionDecl * ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr)
Given an expression that refers to an overloaded function, try to resolve that overloaded function ex...
Definition: SemaOverload.cpp:12760
clang::Sema::PCC_MemberTemplate
@ PCC_MemberTemplate
Code completion occurs following one or more template headers within a class.
Definition: Sema.h:13222
clang::Sema::InstantiatedNonDependentTypes
llvm::DenseSet< QualType > InstantiatedNonDependentTypes
Non-dependent types used in templates that have already been instantiated by some template instantiat...
Definition: Sema.h:9366
ExpressionTraits.h
clang::Stmt::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition: Stmt.cpp:325
clang::Sema::GatherArgumentsForCall
bool GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.
Definition: SemaExpr.cpp:6366
clang::Sema::ActOnOpenMPNogroupClause
OMPClause * ActOnOpenMPNogroupClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nogroup' clause.
Definition: SemaOpenMP.cpp:17481
clang::Sema::CXXDefaultConstructor
@ CXXDefaultConstructor
Definition: Sema.h:1546
clang::Sema::OpenMPVarListDataTy::RLoc
SourceLocation RLoc
Definition: Sema.h:11979
clang::UnresolvedMemberExpr
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
Definition: ExprCXX.h:3883
clang::Sema::ICEConvertDiagnoser::diagnoseNotInt
virtual SemaDiagnosticBuilder diagnoseNotInt(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
clang::Sema::SimplerImplicitMoveMode::Normal
@ Normal
clang::Sema::SetDeclDefaulted
void SetDeclDefaulted(Decl *dcl, SourceLocation DefaultLoc)
Definition: SemaDeclCXX.cpp:17522
clang::OMPTraitInfo
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
Definition: OpenMPClause.h:8789
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:736
clang::Sema::DiagnoseAbstractType
void DiagnoseAbstractType(const CXXRecordDecl *RD)
Definition: SemaDeclCXX.cpp:5838
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1407
Attr.h
clang::Sema::AlignPackInfo::Packed
@ Packed
Definition: Sema.h:497
clang::Sema::MatchAllMethodDeclarations
void MatchAllMethodDeclarations(const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false)
MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declar...
Definition: SemaDeclObjC.cpp:2829
clang::Sema::AddXConsumedAttr
void AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation)
Definition: SemaDeclAttr.cpp:5778
clang::Sema::LateTemplateParserCleanup
LateTemplateParserCleanupCB * LateTemplateParserCleanup
Definition: Sema.h:926
clang::Sema::BuildExprRequirement
concepts::ExprRequirement * BuildExprRequirement(Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement)
Definition: SemaExprCXX.cpp:9012
clang::ArrayType::ArraySizeModifier
ArraySizeModifier
Capture whether this is a normal array (e.g.
Definition: Type.h:3025
clang::Sema::LookupAnyName
@ LookupAnyName
Look up any declaration with any name.
Definition: Sema.h:4333
clang::Sema::ActOnTag
DeclResult ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody=nullptr)
This is invoked when we see 'struct foo' or 'struct {'.
Definition: SemaDecl.cpp:16615
clang::Sema::ActOnAsTypeExpr
ExprResult ActOnAsTypeExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_astype(...)
Definition: SemaExpr.cpp:7113
Ownership.h
clang::Sema::ContextualImplicitConverter::noteAmbiguous
virtual SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
Emits a note for one of the candidate conversions.
clang::Sema::isOpenMPRebuildMemberExpr
bool isOpenMPRebuildMemberExpr(ValueDecl *D)
The member expression(this->fd) needs to be rebuilt in the template instantiation to generate private...
Definition: SemaOpenMP.cpp:2304
clang::Sema::AR_accessible
@ AR_accessible
Definition: Sema.h:7851
clang::EST_None
@ EST_None
no exception specification
Definition: ExceptionSpecificationType.h:21
clang::Sema::SubstTypeConstraint
bool SubstTypeConstraint(TemplateTypeParmDecl *Inst, const TypeConstraint *TC, const MultiLevelTemplateArgumentList &TemplateArgs, bool EvaluateConstraint)
Definition: SemaTemplateInstantiate.cpp:2660
clang::Sema::LOLR_ErrorNoDiagnostic
@ LOLR_ErrorNoDiagnostic
The lookup found no match but no diagnostic was issued.
Definition: Sema.h:4367
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:50
clang::Sema::ActOnReenterFunctionContext
void ActOnReenterFunctionContext(Scope *S, Decl *D)
Push the parameters of D, which must be a function, into scope.
Definition: SemaDecl.cpp:1470
clang::Sema::AddOverriddenMethods
bool AddOverriddenMethods(CXXRecordDecl *DC, CXXMethodDecl *MD)
AddOverriddenMethods - See if a method overrides any in the base classes, and if so,...
Definition: SemaDecl.cpp:8743
clang::Sema::PragmaStack
Definition: Sema.h:595
clang::tooling::Filter
llvm::cl::opt< std::string > Filter
clang::Sema::getMoreSpecializedPartialSpecialization
ClassTemplatePartialSpecializationDecl * getMoreSpecializedPartialSpecialization(ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
Returns the more specialized class template partial specialization according to the rules of partial ...
Definition: SemaTemplateDeduction.cpp:5675
clang::Sema::LookupImplementedMethodInGlobalPool
ObjCMethodDecl * LookupImplementedMethodInGlobalPool(Selector Sel)
LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.
Definition: SemaDeclObjC.cpp:3650
clang::Sema::ActOnOpenMPTargetSimdDirective
StmtResult ActOnOpenMPTargetSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:14116
clang::Sema::ActOnCXXEnterDeclInitializer
void ActOnCXXEnterDeclInitializer(Scope *S, Decl *Dcl)
ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration ...
Definition: SemaDeclCXX.cpp:17847
clang::Sema::BuildStmtExpr
ExprResult BuildStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc, unsigned TemplateDepth)
Definition: SemaExpr.cpp:16139
clang::Sema::hasVisibleDeclarationSlow
bool hasVisibleDeclarationSlow(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules)
Definition: SemaLookup.cpp:2036
clang::Sema::getNormalizedAssociatedConstraints
const NormalizedConstraint * getNormalizedAssociatedConstraints(NamedDecl *ConstrainedDecl, ArrayRef< const Expr * > AssociatedConstraints)
Definition: SemaConcept.cpp:1083
clang::UnresolvedSetIterator
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:32
clang::concepts::Requirement::SubstitutionDiagnostic
Definition: ExprConcepts.h:158
clang::Sema::ActOnBuiltinBitCastExpr
ExprResult ActOnBuiltinBitCastExpr(SourceLocation KWLoc, Declarator &Dcl, ExprResult Operand, SourceLocation RParenLoc)
Definition: SemaCast.cpp:382
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2943
clang::Sema::DeclareRISCVVBuiltins
bool DeclareRISCVVBuiltins
Indicate RISC-V vector builtin functions enabled or not.
Definition: Sema.h:1629
clang::Sema::StdBadAlloc
LazyDeclPtr StdBadAlloc
The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
Definition: Sema.h:1140
clang::Sema::CheckDependentFunctionTemplateSpecialization
bool CheckDependentFunctionTemplateSpecialization(FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous)
Perform semantic analysis for the given dependent function template specialization.
Definition: SemaTemplate.cpp:9264
clang::Sema::CheckObjCConversion
ARCConversionResult CheckObjCConversion(SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool Diagnose=true, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD)
Checks for invalid conversions and casts between retainable pointers and other pointer kinds for ARC ...
Definition: SemaExprObjC.cpp:4386
clang::Sema::BuildBinOp
ExprResult BuildBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
Definition: SemaExpr.cpp:15628
clang::TypeTrait
TypeTrait
Names for traits that operate specifically on types.
Definition: TypeTraits.h:21
clang::Sema::PCC_ObjCImplementation
@ PCC_ObjCImplementation
Code completion occurs within an Objective-C implementation or category implementation.
Definition: Sema.h:13213
clang::Sema::actOnLambdaInitCaptureInitialization
ParsedType actOnLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init)
Perform initialization analysis of the init-capture and perform any implicit conversions such as an l...
Definition: Sema.h:7122
clang::Sema::FilterLookupForScope
void FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.
Definition: SemaDecl.cpp:1617
clang::Sema::AA_Assigning
@ AA_Assigning
Definition: Sema.h:3708
clang::RequiresExpr
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Definition: ExprConcepts.h:476
clang::DiagnosticsEngine
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:192
clang::Sema::checkArrayElementAlignment
bool checkArrayElementAlignment(QualType EltTy, SourceLocation Loc)
Definition: SemaType.cpp:2405
clang::Sema::CheckOMPRequiresDecl
OMPRequiresDecl * CheckOMPRequiresDecl(SourceLocation Loc, ArrayRef< OMPClause * > Clauses)
Check restrictions on Requires directive.
Definition: SemaOpenMP.cpp:3523
clang::Sema::LookupOperatorName
@ LookupOperatorName
Look up of an operator name (e.g., operator+) for use with operator overloading.
Definition: Sema.h:4300
clang::EST_Dynamic
@ EST_Dynamic
throw(T1, T2)
Definition: ExceptionSpecificationType.h:23
clang::Sema::ActOnNamespaceAliasDef
Decl * ActOnNamespaceAliasDef(Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
Definition: SemaDeclCXX.cpp:13214
clang::LookupResult
Represents the results of name lookup.
Definition: Lookup.h:46
clang::Sema::FST_Strftime
@ FST_Strftime
Definition: Sema.h:13569
clang::Sema::ActOnObjCAtSynchronizedStmt
StmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, Expr *SynchExpr, Stmt *SynchBody)
Definition: SemaStmt.cpp:4312
clang::Qualifiers
The collection of all-type qualifiers we support.
Definition: Type.h:146
clang::Sema::GetSignedSizelessVectorType
QualType GetSignedSizelessVectorType(QualType V)
Definition: SemaExpr.cpp:13149
clang::Sema::BuildMemberReferenceExpr
ExprResult BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
Definition: SemaExprMember.cpp:743
clang::Sema::ActOnTypeParameter
NamedDecl * ActOnTypeParameter(Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg, bool HasTypeConstraint)
ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed.
Definition: SemaTemplate.cpp:1035
clang::Sema::CheckDestructor
bool CheckDestructor(CXXDestructorDecl *Destructor)
CheckDestructor - Checks a fully-formed destructor definition for well-formedness,...
Definition: SemaDeclCXX.cpp:10638
TypoCorrection.h
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:774
clang::Sema::AddMemberOperatorCandidates
void AddMemberOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, OverloadCandidateParamOrder PO={})
Add overload candidates for overloaded operators that are member functions.
Definition: SemaOverload.cpp:7869
clang::Sema::DeclareImplicitDefaultConstructor
CXXConstructorDecl * DeclareImplicitDefaultConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit default constructor for the given class.
Definition: SemaDeclCXX.cpp:13519
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1724
clang::OpenMPReductionClauseModifier
OpenMPReductionClauseModifier
OpenMP modifiers for 'reduction' clause.
Definition: OpenMPKinds.h:186
clang::Sema::Diag
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID, bool DeferHint=false)
Emit a diagnostic.
Definition: Sema.cpp:1877
clang::Sema::SpecialMemberOverloadResult::Kind
Kind
Definition: Sema.h:1424
clang::Sema::GetTypeForDeclarator
TypeSourceInfo * GetTypeForDeclarator(Declarator &D, Scope *S)
GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
Definition: SemaType.cpp:5924
clang::TargetInfo
Exposes information about the current target.
Definition: TargetInfo.h:205
clang::Sema::getPrintable
static QualType getPrintable(QualType T)
Definition: Sema.h:2189
clang::Sema::TUScope
Scope * TUScope
Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in...
Definition: Sema.h:1133
clang::Sema::CUDACheckLambdaCapture
void CUDACheckLambdaCapture(CXXMethodDecl *D, const sema::Capture &Capture)
Definition: SemaCUDA.cpp:850
clang::Sema::CreateMaterializeTemporaryExpr
MaterializeTemporaryExpr * CreateMaterializeTemporaryExpr(QualType T, Expr *Temporary, bool BoundToLvalueReference)
Definition: SemaInit.cpp:8240
clang::Sema::NamedReturnInfo::S
Status S
Definition: Sema.h:5171
clang::Sema::getOptimizeOffPragmaLocation
SourceLocation getOptimizeOffPragmaLocation() const
Get the location for the currently active "\#pragma clang optimize off". If this location is invalid,...
Definition: Sema.h:10800
clang::Sema::ContextRAII::pop
void pop()
Definition: Sema.h:1026
clang::Sema::recreateSyntacticForm
Expr * recreateSyntacticForm(PseudoObjectExpr *E)
Given a pseudo-object expression, recreate what it looks like syntactically without the attendant Opa...
Definition: SemaPseudoObject.cpp:1638
clang::Sema::BuildMSDependentExistsStmt
StmtResult BuildMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, Stmt *Nested)
Definition: SemaStmt.cpp:4611
clang::Sema::PCSK_Text
@ PCSK_Text
Definition: Sema.h:455
clang::PreferredTypeBuilder::enterSubscript
void enterSubscript(Sema &S, SourceLocation Tok, Expr *LHS)
Definition: SemaCodeComplete.cpp:587
clang::Sema::GlobalMethodPool::empty
bool empty() const
Definition: Sema.h:1521
clang::Sema::hasMergedDefinitionInCurrentModule
bool hasMergedDefinitionInCurrentModule(NamedDecl *Def)
Definition: SemaLookup.cpp:1612
clang::Sema::ActOnCXXNew
ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer)
ActOnCXXNew - Parsed a C++ 'new' expression.
Definition: SemaExprCXX.cpp:1846
clang::Sema::VerifyIntegerConstantExpression
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold=NoFold)
VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate ...
Definition: SemaExpr.cpp:17467
clang::Sema::ActOnMemberAccessExpr
ExprResult ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl)
The main callback when the parser finds something like expression .
Definition: SemaExprMember.cpp:1703
Module.h
clang::Sema::BuildCallToObjectOfClassType
ExprResult BuildCallToObjectOfClassType(Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over....
Definition: SemaOverload.cpp:14861
clang::Sema::CheckCompareOperands
QualType CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:12621
clang::Sema::ActOnOpenMPIfClause
OMPClause * ActOnOpenMPIfClause(OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'if' clause.
Definition: SemaOpenMP.cpp:16260
clang::Sema::FunctionDeclAndLoc::Loc
SourceLocation Loc
Definition: Sema.h:12959
clang::Sema::BuildAtomicType
QualType BuildAtomicType(QualType T, SourceLocation Loc)
Definition: SemaType.cpp:9563
clang::Sema::CodeSynthesisContexts
SmallVector< CodeSynthesisContext, 16 > CodeSynthesisContexts
List of active code synthesis contexts.
Definition: Sema.h:9359
clang::Sema::Ovl_NonFunction
@ Ovl_NonFunction
This is not an overload because the lookup results contain a non-function.
Definition: Sema.h:3730
clang::FileNullability::PointerLoc
SourceLocation PointerLoc
The first pointer declarator (of any pointer kind) in the file that does not have a corresponding nul...
Definition: Sema.h:252
clang::Sema::checkClassLevelCodeSegAttribute
void checkClassLevelCodeSegAttribute(CXXRecordDecl *Class)
Definition: SemaDeclCXX.cpp:6320
clang::Sema::TUK_Definition
@ TUK_Definition
Definition: Sema.h:3310
clang::Sema::CVT_Unified
@ CVT_Unified
Emitted on both sides with different addresses.
Definition: Sema.h:13069
clang::Sema::DiagnoseSizeOfParametersAndReturnValue
void DiagnoseSizeOfParametersAndReturnValue(ArrayRef< ParmVarDecl * > Parameters, QualType ReturnTy, NamedDecl *D)
Diagnose whether the size of parameters or return value of a function or obj-c method definition is p...
Definition: SemaDecl.cpp:14734
clang::PreferredTypeBuilder
Tracks expected type during expression parsing, for use in code completion.
Definition: Sema.h:299
clang::Sema::ActOnCXXForRangeIdentifier
StmtResult ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs)
Definition: SemaDecl.cpp:13867
clang::Sema::DefaultedComparisonKind::Relational
@ Relational
This is an <, <=, >, or >= that should be implemented as a rewrite in terms of a <=> comparison.
clang::Sema::ActOnAttributedStmt
StmtResult ActOnAttributedStmt(const ParsedAttributes &AttrList, Stmt *SubStmt)
Definition: SemaStmt.cpp:599
clang::UsingShadowDecl
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3234
clang::Sema::BuildEmptyCXXFoldExpr
ExprResult BuildEmptyCXXFoldExpr(SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
Definition: SemaTemplateVariadic.cpp:1269
clang::Sema::DiscardCleanupsInEvaluationContext
void DiscardCleanupsInEvaluationContext()
Definition: SemaExpr.cpp:18037
clang::Parser
Parser - This implements a parser for the C family of languages.
Definition: Parser.h:61
clang::Sema::UPPC_IfExists
@ UPPC_IfExists
Microsoft __if_exists.
Definition: Sema.h:8639
clang::Sema::ContextualImplicitConverter::ContextualImplicitConverter
ContextualImplicitConverter(bool Suppress=false, bool SuppressConversion=false)
Definition: Sema.h:3872
clang::Sema::SemaDiagnosticBuilder::operator<<
const SemaDiagnosticBuilder & operator<<(T &&V) const
Definition: Sema.h:1823
clang::Sema::ActOnOpenMPForDirective
StmtResult ActOnOpenMPForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10330
clang::Sema::getCopyElisionCandidate
const VarDecl * getCopyElisionCandidate(NamedReturnInfo &Info, QualType ReturnType)
Updates given NamedReturnInfo's move-eligible and copy-elidable statuses, considering the function re...
Definition: SemaStmt.cpp:3465
clang::ExprObjectKind
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
Definition: Specifiers.h:137
clang::Sema::isObjCMethodDecl
bool isObjCMethodDecl(Decl *D)
Definition: Sema.h:3083
clang::Sema::ActOnOpenMPDeclareMapperVarDecl
TypeResult ActOnOpenMPDeclareMapperVarDecl(Scope *S, Declarator &D)
Check variable declaration in 'omp declare mapper' construct.
Definition: SemaOpenMP.cpp:22327
clang::Sema::CheckAlignasUnderalignment
void CheckAlignasUnderalignment(Decl *D)
Definition: SemaDeclAttr.cpp:4492
clang::Sema::ActOnOpenMPGenericLoopDirective
StmtResult ActOnOpenMPGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10540
clang::Sema::checkStringLiteralArgumentAttr
bool checkStringLiteralArgumentAttr(const AttributeCommonInfo &CI, const Expr *E, StringRef &Str, SourceLocation *ArgLocation=nullptr)
Check if the argument E is a ASCII string literal.
Definition: SemaDeclAttr.cpp:342
clang::Sema::CreateBuiltinBinOp
ExprResult CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc.
Definition: SemaExpr.cpp:15106
clang::Sema::getSourceManager
SourceManager & getSourceManager() const
Definition: Sema.h:1660
clang::Sema::LateParsedInstantiations
SmallVector< PendingImplicitInstantiation, 1 > LateParsedInstantiations
Queue of implicit template instantiations that cannot be performed eagerly.
Definition: Sema.h:9827
clang::Sema::CheckVectorCast
bool CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind)
Definition: SemaExpr.cpp:8079
clang::Sema::CCEK_Enumerator
@ CCEK_Enumerator
Enumerator value with fixed underlying type.
Definition: Sema.h:3853
clang::Sema::hasReachableDeclaration
bool hasReachableDeclaration(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine whether any declaration of an entity is reachable.
Definition: Sema.h:2391
clang::Sema::LocalEagerInstantiationScope::LocalEagerInstantiationScope
LocalEagerInstantiationScope(Sema &S)
Definition: Sema.h:9886
clang::Sema::DefaultedFunctionKind::DefaultedFunctionKind
DefaultedFunctionKind(DefaultedComparisonKind Comp)
Definition: Sema.h:3403
clang::Sema::NameClassification::UndeclaredTemplate
static NameClassification UndeclaredTemplate(TemplateName Name)
Definition: Sema.h:2734
clang::Sema::getAsTemplateNameDecl
static NamedDecl * getAsTemplateNameDecl(NamedDecl *D, bool AllowFunctionTemplates=true, bool AllowDependent=true)
Try to interpret the lookup result D as a template-name.
Definition: SemaTemplate.cpp:101
clang::Sema::AttributeCompletion::Scope
@ Scope
clang::Sema::ActOnOpenMPCopyprivateClause
OMPClause * ActOnOpenMPCopyprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyprivate' clause.
Definition: SemaOpenMP.cpp:20344
clang::Sema::CheckTemplateIdType
QualType CheckTemplateIdType(TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs)
Definition: SemaTemplate.cpp:3818
clang::Sema::SpecialMemberOverloadResult::Success
@ Success
Definition: Sema.h:1427
clang::Sema::AR_dependent
@ AR_dependent
Definition: Sema.h:7853
clang::Sema::FnBodyKind::Other
@ Other
C++ [dcl.fct.def.general]p1 function-body: ctor-initializer[opt] compound-statement function-try-bloc...
clang::Sema::ExpressionEvaluationContext::DiscardedStatement
@ DiscardedStatement
The current expression occurs within a discarded statement.
clang::Sema::ActOnPragmaAttributePop
void ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
Called on well-formed '#pragma clang attribute pop'.
Definition: SemaAttr.cpp:1082
clang::Sema::BFRK_Rebuild
@ BFRK_Rebuild
Instantiation or recovery rebuild of a for-range statement.
Definition: Sema.h:5121
clang::Sema::TDK_NonDependentConversionFailure
@ TDK_NonDependentConversionFailure
Checking non-dependent argument conversions failed.
Definition: Sema.h:8998
clang::Sema::LookupQualifiedName
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
Definition: SemaLookup.cpp:2418
clang::Sema::ActOnCastExpr
ExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr)
Definition: SemaExpr.cpp:8167
clang::Sema::CodeCompleteInPreprocessorConditionalExclusion
void CodeCompleteInPreprocessorConditionalExclusion(Scope *S)
Definition: SemaCodeComplete.cpp:9882
clang::Sema::ActOnMemberAccessExtraArgs::S
Scope * S
Definition: Sema.h:5772
clang::Sema::FunctionEmissionStatus::Unknown
@ Unknown
clang::CapturedRegionKind
CapturedRegionKind
The different kinds of captured statement.
Definition: CapturedStmt.h:16
clang::Sema::MergeTypedefNameDecl
void MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls)
MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous...
Definition: SemaDecl.cpp:2560
clang::Sema::tryToFixVariablyModifiedVarType
bool tryToFixVariablyModifiedVarType(TypeSourceInfo *&TInfo, QualType &T, SourceLocation Loc, unsigned FailedFoldDiagID)
Attempt to fold a variable-sized type to a constant-sized type, returning true if we were successful.
Definition: SemaDecl.cpp:6574
clang::Sema::ActOnOpenMPWhenClause
OMPClause * ActOnOpenMPWhenClause(OMPTraitInfo &TI, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'when' clause.
clang::Sema::PCC_ObjCInstanceVariableList
@ PCC_ObjCInstanceVariableList
Code completion occurs within the list of instance variables in an Objective-C interface,...
Definition: Sema.h:13216
clang::Sema::PragmaStack::PragmaStack
PragmaStack(const ValueType &Default)
Definition: Sema.h:664
clang::OpenMPMapClauseKind
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
Definition: OpenMPKinds.h:70
clang::Sema::CheckAddressOfMemberAccess
AccessResult CheckAddressOfMemberAccess(Expr *OvlExpr, DeclAccessPair FoundDecl)
Definition: SemaAccess.cpp:1839
clang::Sema::ActOnOpenMPDefaultmapClause
OMPClause * ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
Called on well-formed 'defaultmap' clause.
Definition: SemaOpenMP.cpp:22758
clang::Sema::ActOnOpenMPDestroyClause
OMPClause * ActOnOpenMPDestroyClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'destroy' clause.
Definition: SemaOpenMP.cpp:17674
clang::Sema::CodeCompleteObjCProtocolDecl
void CodeCompleteObjCProtocolDecl(Scope *S)
Definition: SemaCodeComplete.cpp:8410
clang::Sema::BuiltinEnumUnderlyingType
QualType BuiltinEnumUnderlyingType(QualType BaseType, SourceLocation Loc)
Definition: SemaType.cpp:9324
clang::InitListExpr
Describes an C or C++ initializer list.
Definition: Expr.h:4799
clang::Sema::PSK_Push_Set
@ PSK_Push_Set
Definition: Sema.h:482
clang::Sema::CheckVectorConditionalTypes
QualType CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
Definition: SemaExprCXX.cpp:6288
clang::Sema::RequiredTemplateKind::RequiredTemplateKind
RequiredTemplateKind(SourceLocation TemplateKWLoc=SourceLocation())
Template name is required if TemplateKWLoc is valid.
Definition: Sema.h:7992
clang::Sema::AttributeCompletion::None
@ None
clang::Sema::SpecialMemberOverloadResult::setKind
void setKind(Kind K)
Definition: Sema.h:1442
clang::Sema::DefaultSynthesizeProperties
void DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd)
DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesiz...
Definition: SemaObjCProperty.cpp:1887
clang::Sema::BuildPredefinedExpr
ExprResult BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentKind IK)
Definition: SemaExpr.cpp:3530
clang::NamedDecl::isExternallyDeclarable
bool isExternallyDeclarable() const
Determine whether this declaration can be redeclared in a different translation unit.
Definition: Decl.h:413
clang::Sema::CachedFunctionScope
std::unique_ptr< sema::FunctionScopeInfo > CachedFunctionScope
Definition: Sema.h:801
clang::Sema::TPC_FriendFunctionTemplate
@ TPC_FriendFunctionTemplate
Definition: Sema.h:8139
clang::Sema::AddTemplateOverloadCandidate
void AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, OverloadCandidateParamOrder PO={})
Add a C++ function template specialization as a candidate in the candidate set, using template argume...
Definition: SemaOverload.cpp:7272
clang::Sema::AddFunctionCandidates
void AddFunctionCandidates(const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, bool SuppressUserConversions=false, bool PartialOverloading=false, bool FirstArgumentIsBase=false)
Add all of the function declarations in the given function set to the overload candidate set.
Definition: SemaOverload.cpp:6927
clang::Sema::setFunctionHasMustTail
void setFunctionHasMustTail()
Definition: Sema.cpp:2298
clang::Sema::createLambdaClosureType
CXXRecordDecl * createLambdaClosureType(SourceRange IntroducerRange, TypeSourceInfo *Info, unsigned LambdaDependencyKind, LambdaCaptureDefault CaptureDefault)
Create a new lambda closure type.
Definition: SemaLambda.cpp:244
clang::Sema::AbstractFieldType
@ AbstractFieldType
Definition: Sema.h:7940
clang::Sema::ConstraintEvalRAII::OldValue
bool OldValue
Definition: Sema.h:9979
clang::Sema::BoundTypeDiagnoser::BoundTypeDiagnoser
BoundTypeDiagnoser(unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2209
clang::Sema::CodeCompletePreprocessorExpression
void CodeCompletePreprocessorExpression()
Definition: SemaCodeComplete.cpp:9914
clang::Sema::UPPC_Lambda
@ UPPC_Lambda
Lambda expression.
Definition: Sema.h:8645
clang::Sema::BuildCXXConstructExpr
ExprResult BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default a...
Definition: SemaDeclCXX.cpp:15564
clang::Sema::CompleteTypeKind::AcceptSizeless
@ AcceptSizeless
Relax the normal rules for complete types so that they include sizeless built-in types.
clang::Sema::ActOnStartCXXMemberDeclarations
void ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, bool IsAbstract, SourceLocation LBraceLoc)
ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifie...
Definition: SemaDecl.cpp:17596
clang::Sema::FormatStringInfo::FirstDataArg
unsigned FirstDataArg
Definition: Sema.h:13412
clang::Sema::buildCoroutineParameterMoves
bool buildCoroutineParameterMoves(SourceLocation Loc)
Definition: SemaCoroutine.cpp:1791
clang::Sema::NTCUC_FunctionParam
@ NTCUC_FunctionParam
Definition: Sema.h:2993
clang::Sema::ActOnCXXDelete
ExprResult ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
ActOnCXXDelete - Parsed a C++ 'delete' expression.
Definition: SemaExprCXX.cpp:3580
clang::Sema::CheckMatrixMultiplyOperands
QualType CheckMatrixMultiplyOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
Definition: SemaExpr.cpp:13460
clang::Sema::getPrintable
static StringRef getPrintable(StringRef S)
Definition: Sema.h:2183
clang::Sema::PrintInstantiationStack
void PrintInstantiationStack()
Prints the current instantiation stack through a series of notes.
Definition: SemaTemplateInstantiate.cpp:682
clang::Sema::AlignPackIncludeState::HasNonDefaultValue
bool HasNonDefaultValue
Definition: Sema.h:691
clang::Sema::BuildBasePathArray
void BuildBasePathArray(const CXXBasePaths &Paths, CXXCastPath &BasePath)
Definition: SemaDeclCXX.cpp:2945
clang::Sema::SubstAutoTypeSourceInfo
TypeSourceInfo * SubstAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
Definition: SemaTemplateDeduction.cpp:4878
clang::Sema::CheckLiteralKind
ObjCLiteralKind CheckLiteralKind(Expr *FromE)
Definition: SemaExpr.cpp:12130
clang::Sema::UsualArithmeticConversions
QualType UsualArithmeticConversions(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, ArithConvKind ACK)
UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6....
Definition: SemaExpr.cpp:1528
clang::Sema::notePreviousDefinition
void notePreviousDefinition(const NamedDecl *Old, SourceLocation New)
Definition: SemaDecl.cpp:4748
clang::ObjCMethodList
a linked list of methods with the same selector name but different signatures.
Definition: ObjCMethodList.h:25
clang::Sema::ActOnFields
void ActOnFields(Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
Definition: SemaDecl.cpp:18553
llvm::SmallPtrSet
Definition: ASTContext.h:55
clang::Sema::NonTagKind
NonTagKind
Common ways to introduce type names without a tag for use in diagnostics.
Definition: Sema.h:3286
clang::Sema::isEmptyCudaDestructor
bool isEmptyCudaDestructor(SourceLocation Loc, CXXDestructorDecl *CD)
Definition: SemaCUDA.cpp:499
clang::Sema::ActOnOpenMPScanDirective
StmtResult ActOnOpenMPScanDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp scan'.
Definition: SemaOpenMP.cpp:11239
clang::Sema::ConditionResult::isInvalid
bool isInvalid() const
Definition: Sema.h:12812
clang::Sema::AddBuiltinCandidate
void AddBuiltinCandidate(QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
AddBuiltinCandidate - Add a candidate for a built-in operator.
Definition: SemaOverload.cpp:7925
clang::MacroInfo
Encapsulates the data about a macro definition (e.g.
Definition: MacroInfo.h:39
clang::Sema::ActOnOpenMPErrorDirective
StmtResult ActOnOpenMPErrorDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, bool InExContext=true)
Called on well-formed '#pragma omp error'.
Definition: SemaOpenMP.cpp:11115
clang::Sema::ActOnVarTemplateSpecialization
DeclResult ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
Definition: SemaTemplate.cpp:4467
clang::Sema::ReferenceConversionsScope::DerivedToBase
@ DerivedToBase
Definition: Sema.h:12674
clang::Sema::SkippedDefinitionContext
void * SkippedDefinitionContext
Definition: Sema.h:3472
clang::DiagnosticsEngine::setLastDiagnosticIgnored
void setLastDiagnosticIgnored(bool Ignored)
Pretend that the last diagnostic issued was ignored, so any subsequent notes will be suppressed,...
Definition: Diagnostic.h:756
clang::Sema::ActOnPrivateModuleFragmentDecl
DeclGroupPtrTy ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc)
The parser has processed a private-module-fragment declaration that begins the definition of the priv...
Definition: SemaModule.cpp:407
clang::Sema::ActOnReenterCXXMethodParameter
void ActOnReenterCXXMethodParameter(Scope *S, ParmVarDecl *Param)
This is used to implement the constant expression evaluation part of the attribute enable_if extensio...
Definition: SemaDeclCXX.cpp:10451
clang::Sema::CompoundScopeRAII::~CompoundScopeRAII
~CompoundScopeRAII()
Definition: Sema.h:5037
clang::Sema::BoundTypeDiagnoser::diagnose
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
Definition: Sema.h:2214
clang::Sema::DiagnoseOwningPropertyGetterSynthesis
void DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D)
Definition: SemaObjCProperty.cpp:2257
clang::Sema::ActOnOpenMPTaskgroupDirective
StmtResult ActOnOpenMPTaskgroupDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskgroup'.
Definition: SemaOpenMP.cpp:11162
clang::Sema::isLaxVectorConversion
bool isLaxVectorConversion(QualType srcType, QualType destType)
Is this a legal conversion between two types, one of which is known to be a vector type?
Definition: SemaExpr.cpp:8030
clang::Sema::ActOnOpenMPAcqRelClause
OMPClause * ActOnOpenMPAcqRelClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acq_rel' clause.
Definition: SemaOpenMP.cpp:17451
clang::Sema::checkInitMethod
bool checkInitMethod(ObjCMethodDecl *method, QualType receiverTypeIfCall)
Check whether the given method, which must be in the 'init' family, is a valid member of that family.
Definition: SemaDeclObjC.cpp:42
clang::Sema::CodeCompleteObjCPassingType
void CodeCompleteObjCPassingType(Scope *S, ObjCDeclSpec &DS, bool IsParameter)
Definition: SemaCodeComplete.cpp:7627
clang::Sema::CheckAllocationAccess
AccessResult CheckAllocationAccess(SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
Checks access to an overloaded operator new or delete.
Definition: SemaAccess.cpp:1716
clang::Sema::BuildOverloadedArrowExpr
ExprResult BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists),...
Definition: SemaOverload.cpp:15116
clang::Sema::AllowedExplicit::None
@ None
Allow no explicit functions to be used.
clang::Sema::CheckCompletedCXXClass
void CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record)
Perform semantic checks on a class definition that has been completing, introducing implicitly-declar...
Definition: SemaDeclCXX.cpp:6788
clang::Sema::AddMsStructLayoutForRecord
void AddMsStructLayoutForRecord(RecordDecl *RD)
AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
Definition: SemaAttr.cpp:89
clang::Sema::NameClassification::getTemplateName
TemplateName getTemplateName() const
Definition: Sema.h:2757
clang::Sema::CheckSubscriptingKind
ObjCSubscriptKind CheckSubscriptingKind(Expr *FromE)
CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being don...
Definition: SemaPseudoObject.cpp:1045
clang::Sema::ExtVectorDeclsType
LazyVector< TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2 > ExtVectorDeclsType
Definition: Sema.h:835
clang::Sema::ActOnFinishCXXInClassMemberInitializer
void ActOnFinishCXXInClassMemberInitializer(Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
This is invoked after parsing an in-class initializer for a non-static C++ class member,...
Definition: SemaDeclCXX.cpp:4078
clang::Sema::ExpressionEvaluationContext::PotentiallyEvaluatedIfUsed
@ PotentiallyEvaluatedIfUsed
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
clang::Sema::startOpenMPLoop
void startOpenMPLoop()
If the current region is a loop-based region, mark the start of the loop construct.
Definition: SemaOpenMP.cpp:2490
clang::Sema::isCast
static bool isCast(CheckedConversionKind CCK)
Definition: Sema.h:12214
clang::Sema::mergeInternalLinkageAttr
InternalLinkageAttr * mergeInternalLinkageAttr(Decl *D, const ParsedAttr &AL)
Definition: SemaDeclAttr.cpp:4811
clang::Sema::ActOnPragmaFPEvalMethod
void ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value)
Definition: SemaAttr.cpp:524
clang::Sema::FixOverloadedFunctionReference
Expr * FixOverloadedFunctionReference(Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn)
FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibl...
Definition: SemaOverload.cpp:15384
clang::Sema::DefineImplicitCopyConstructor
void DefineImplicitCopyConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy const...
Definition: SemaDeclCXX.cpp:15246
clang::ExternalSemaSource::ReadUnusedFileScopedDecls
virtual void ReadUnusedFileScopedDecls(SmallVectorImpl< const DeclaratorDecl * > &Decls)
Read the set of unused file-scope declarations known to the external Sema source.
Definition: ExternalSemaSource.h:115
clang::Sema::ActOnDependentTag
TypeResult ActOnDependentTag(Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation TagLoc, SourceLocation NameLoc)
Definition: SemaTemplate.cpp:10706
clang::Sema::SrcLocSet
llvm::SmallSet< SourceLocation, 2 > SrcLocSet
Definition: Sema.h:9799
clang::Sema::FST_OSTrace
@ FST_OSTrace
Definition: Sema.h:13573
clang::Sema::IsMemberPointerConversion
bool IsMemberPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
IsMemberPointerConversion - Determines whether the conversion of the expression From,...
Definition: SemaOverload.cpp:3186
clang::Sema::AlignPackIncludeState::CurrentValue
AlignPackInfo CurrentValue
Definition: Sema.h:689
clang::Sema::ActOnFinishTrailingRequiresClause
ExprResult ActOnFinishTrailingRequiresClause(ExprResult ConstraintExpr)
Definition: SemaDeclCXX.cpp:4041
clang::Sema::ExpressionEvaluationContextRecord::InitializationContext::InitializationContext
InitializationContext(SourceLocation Loc, ValueDecl *Decl, DeclContext *Context)
Definition: Sema.h:1346
clang::Sema::CodeCompleteObjCSelector
void CodeCompleteObjCSelector(Scope *S, ArrayRef< IdentifierInfo * > SelIdents)
Definition: SemaCodeComplete.cpp:8308
clang::Sema::BuildPointerType
QualType BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a pointer type.
Definition: SemaType.cpp:2168
clang::Sema::isEquivalentInternalLinkageDeclaration
bool isEquivalentInternalLinkageDeclaration(const NamedDecl *A, const NamedDecl *B)
Determine if A and B are equivalent internal linkage declarations from different modules,...
Definition: SemaOverload.cpp:10171
clang::Sema::UnmarkAsLateParsedTemplate
void UnmarkAsLateParsedTemplate(FunctionDecl *FD)
Definition: SemaTemplate.cpp:11324
clang::Sema::CheckTransparentUnionArgumentConstraints
AssignConvertType CheckTransparentUnionArgumentConstraints(QualType ArgType, ExprResult &RHS)
Definition: SemaExpr.cpp:10119
clang::Sema::checkPseudoObjectAssignment
ExprResult checkPseudoObjectAssignment(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
Definition: SemaPseudoObject.cpp:1582
clang::Sema::BuildCallExpr
ExprResult BuildCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
BuildCallExpr - Handle a call to Fn with the specified array of arguments.
Definition: SemaExpr.cpp:6881
DeclSpec.h
clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Sema::ReuseLambdaContextDecl_t, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other)
Definition: Sema.h:13932
clang::Sema::hasCStrMethod
bool hasCStrMethod(const Expr *E)
Check to see if a given expression could have '.c_str()' called on it.
Definition: SemaChecking.cpp:9936
clang::Sema::ActOnCXXNullPtrLiteral
ExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc)
ActOnCXXNullPtrLiteral - Parse 'nullptr'.
Definition: SemaExprCXX.cpp:820
clang::Sema::BuildObjCArrayLiteral
ExprResult BuildObjCArrayLiteral(SourceRange SR, MultiExprArg Elements)
Definition: SemaExprObjC.cpp:794
clang::Sema::ActOnPostfixUnaryOp
ExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input)
Definition: SemaExpr.cpp:4745
clang::tooling::X
static ToolExecutorPluginRegistry::Add< AllTUsToolExecutorPlugin > X("all-TUs", "Runs FrontendActions on all TUs in the compilation database. " "Tool results are stored in memory.")
clang::Sema::MethodPool
GlobalMethodPool MethodPool
Method Pool - allows efficient lookup when typechecking messages to "id".
Definition: Sema.h:1533
clang::Sema::getPrintable
static const IdentifierInfo * getPrintable(const IdentifierInfo *II)
Definition: Sema.h:2185
clang::Sema::ActOnPropertyImplDecl
Decl * ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind)
ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property ...
Definition: SemaObjCProperty.cpp:1077
clang::Sema::AtomicArgumentOrder::API
@ API
clang::Sema::AP_Explicit
@ AP_Explicit
The availability attribute was specified explicitly next to the declaration.
Definition: Sema.h:3624
clang::Sema::TemplateInstCallbacks
std::vector< std::unique_ptr< TemplateInstantiationCallback > > TemplateInstCallbacks
The template instantiation callbacks to trace or track instantiations (objects can be chained).
Definition: Sema.h:9416
clang::CXXScopeSpec
Represents a C++ nested-name-specifier or a global scope specifier.
Definition: DeclSpec.h:65
clang::Sema::isSimpleTypeSpecifier
bool isSimpleTypeSpecifier(tok::TokenKind Kind) const
Determine whether the token kind starts a simple-type-specifier.
Definition: SemaDecl.cpp:128
clang::isComputedNoexcept
bool isComputedNoexcept(ExceptionSpecificationType ESpecType)
Definition: ExceptionSpecificationType.h:39
clang::Sema::ActOnFinishFunctionDeclarationDeclarator
void ActOnFinishFunctionDeclarationDeclarator(Declarator &D)
Called after parsing a function declarator belonging to a function declaration.
Definition: SemaDeclCXX.cpp:18601
clang::Sema::PragmaStack::hasValue
bool hasValue() const
Definition: Sema.h:667
clang::Sema::ActOnSuperClassOfClassInterface
void ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange)
Definition: SemaDeclObjC.cpp:542
clang::Sema::ActOnPragmaFEnvRound
void ActOnPragmaFEnvRound(SourceLocation Loc, llvm::RoundingMode)
Called to set constant rounding mode for floating point operations.
Definition: SemaAttr.cpp:1332
clang::Sema::FunctionEmissionStatus
FunctionEmissionStatus
Status of the function emission on the CUDA/HIP/OpenMP host/device attrs.
Definition: Sema.h:4498
clang::ClassTemplatePartialSpecializationDecl
Definition: DeclTemplate.h:2098
ExprOpenMP.h
clang::Sema::ActOnFinishHLSLBuffer
void ActOnFinishHLSLBuffer(Decl *Dcl, SourceLocation RBrace)
Definition: SemaHLSL.cpp:30
clang::Sema::TDK_SubstitutionFailure
@ TDK_SubstitutionFailure
Substitution of the deduced template argument values resulted in an error.
Definition: Sema.h:8977
clang::PrintingPolicy
Describes how types, statements, expressions, and declarations should be printed.
Definition: PrettyPrinter.h:57
clang::Sema::SelectorsForTypoCorrection
const ObjCMethodDecl * SelectorsForTypoCorrection(Selector Sel, QualType ObjectType=QualType())
Definition: SemaDeclObjC.cpp:3706
clang::Sema::GetNameFromUnqualifiedId
DeclarationNameInfo GetNameFromUnqualifiedId(const UnqualifiedId &Name)
Retrieves the declaration name from a parsed unqualified-id.
Definition: SemaDecl.cpp:5810
clang::Sema::CheckFunctionConstraints
bool CheckFunctionConstraints(const FunctionDecl *FD, ConstraintSatisfaction &Satisfaction, SourceLocation UsageLoc=SourceLocation(), bool ForOverloadResolution=false)
Check whether the given function decl's trailing requires clause is satisfied, if any.
Definition: SemaConcept.cpp:606
clang::Sema::DiagnoseAlwaysNonNullPointer
void DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
Diagnose pointers that are always non-null.
Definition: SemaChecking.cpp:14639
clang::Sema::NTCUC_DefaultInitializedObject
@ NTCUC_DefaultInitializedObject
Definition: Sema.h:2997
clang::Sema::ActOnStartOfLambdaDefinition
void ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it a...
Definition: SemaLambda.cpp:900
clang::Sema::BuildCallToMemberFunction
ExprResult BuildCallToMemberFunction(Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
BuildCallToMemberFunction - Build a call to a member function.
Definition: SemaOverload.cpp:14564
clang::Sema::CCK_FunctionalCast
@ CCK_FunctionalCast
A functional-style cast.
Definition: Sema.h:12207
clang::Sema::ActOnVariableDeclarator
NamedDecl * ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef< BindingDecl * > Bindings=std::nullopt)
Definition: SemaDecl.cpp:7412
clang::Sema::LastEmittedCodeSynthesisContextDepth
unsigned LastEmittedCodeSynthesisContextDepth
The depth of the context stack at the point when the most recent error or warning was produced.
Definition: Sema.h:9408
clang::Sema::LookupBuiltin
bool LookupBuiltin(LookupResult &R)
Lookup a builtin function, when name lookup would otherwise fail.
Definition: SemaLookup.cpp:905
clang::Sema::ActOnOpenMPThreadsClause
OMPClause * ActOnOpenMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'threads' clause.
Definition: SemaOpenMP.cpp:17471
clang::sema::Capture
Definition: ScopeInfo.h:536
clang::Sema::NameClassification::getKind
NameClassificationKind getKind() const
Definition: Sema.h:2740
clang::Sema::DiscardMisalignedMemberAddress
void DiscardMisalignedMemberAddress(const Type *T, Expr *E)
This function checks if the expression is in the sef of potentially misaligned members and it is conv...
Definition: SemaChecking.cpp:17667
clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization
bool ResolveAndFixSingleFunctionTemplateSpecialization(ExprResult &SrcExpr, bool DoFunctionPointerConversion=false, bool Complain=false, SourceRange OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
Definition: SemaOverload.cpp:12843
clang::Sema::ActOnOpenMPMapClause
OMPClause * ActOnOpenMPMapClause(Expr *IteratorModifier, ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, bool NoDiagnose=false, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
Called on well-formed 'map' clause.
Definition: SemaOpenMP.cpp:22021
LocInfoType.h
clang::ExportDecl
Represents a standard C++ module export declaration.
Definition: Decl.h:4716
clang::Sema::PCSK_Data
@ PCSK_Data
Definition: Sema.h:453
clang::diag::Group
Group
Definition: DiagnosticCategories.h:23
clang::Sema::SatisfactionStackContains
bool SatisfactionStackContains(const NamedDecl *D, const llvm::FoldingSetNodeID &ID) const
Definition: Sema.h:7300
clang::Sema::BuildCaptureField
FieldDecl * BuildCaptureField(RecordDecl *RD, const sema::Capture &Capture)
Build a FieldDecl suitable to hold the given capture.
Definition: SemaLambda.cpp:1742
clang::Sema::AlignPackInfo::Mode
Mode
Definition: Sema.h:497
clang::Sema::StartOpenMPDSABlock
void StartOpenMPDSABlock(OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
Called on start of new data sharing attribute block.
Definition: SemaOpenMP.cpp:2752
clang::Sema::maybeExtendBlockObject
void maybeExtendBlockObject(ExprResult &E)
Do an explicit extend of the given block pointer if we're in ARC.
Definition: SemaExpr.cpp:7667
clang::Sema::ModuleImportState::FirstDecl
@ FirstDecl
Parsing the first decl in a TU.
clang::Sema::LookupOMPMapperName
@ LookupOMPMapperName
Look up the name of an OpenMP user-defined mapper.
Definition: Sema.h:4331
clang::Sema::getStdNamespace
NamespaceDecl * getStdNamespace() const
Definition: SemaDeclCXX.cpp:11385
clang::Sema::IsStringInit
bool IsStringInit(Expr *Init, const ArrayType *AT)
Definition: SemaInit.cpp:155
clang::Sema::ActOnMemberAccessExtraArgs::Id
UnqualifiedId & Id
Definition: Sema.h:5773
clang::Sema::AbstractParamType
@ AbstractParamType
Definition: Sema.h:7938
clang::Sema::TryCapture_ExplicitByRef
@ TryCapture_ExplicitByRef
Definition: Sema.h:5438
clang::Sema::CCEK_ArrayBound
@ CCEK_ArrayBound
Array bound in array declarator or new-expression.
Definition: Sema.h:3855
clang::Sema::SuppressedDiagnostics
SuppressedDiagnosticsMap SuppressedDiagnostics
Definition: Sema.h:9454
clang::Sema::BuildMemberInitializer
MemInitResult BuildMemberInitializer(ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
Definition: SemaDeclCXX.cpp:4428
Identifier
StringRef Identifier
Definition: Format.cpp:2781
clang::InitializationSequence
Describes the sequence of initializations required to initialize a given object or reference with a s...
Definition: Initialization.h:788
clang::Sema::ActOnPragmaMSSection
void ActOnPragmaMSSection(SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
Called on well formed #pragma section().
Definition: SemaAttr.cpp:792
clang::Sema::CheckConversionDeclarator
void CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC)
CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion f...
Definition: SemaDeclCXX.cpp:10815
clang::Sema::DiagnoseHiddenVirtualMethods
void DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD)
Diagnose methods which overload virtual methods in a base class without overriding any.
Definition: SemaDeclCXX.cpp:10113
clang::Sema::OpenMPVarListDataTy::ReductionOrMapperIdScopeSpec
CXXScopeSpec ReductionOrMapperIdScopeSpec
Definition: Sema.h:11980
clang::PreferredTypeBuilder::PreferredTypeBuilder
PreferredTypeBuilder(bool Enabled)
Definition: Sema.h:301
clang::Sema::mergeAlwaysInlineAttr
AlwaysInlineAttr * mergeAlwaysInlineAttr(Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident)
Definition: SemaDeclAttr.cpp:4796
clang::Sema::IsOverload
bool IsOverload(FunctionDecl *New, FunctionDecl *Old, bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs=true, bool ConsiderRequiresClauses=true)
Definition: SemaOverload.cpp:1237
clang::Sema::ActOnStmtExpr
ExprResult ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
Definition: SemaExpr.cpp:16134
clang::FunctionType
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3682
clang::Sema::ActOnCXXGlobalScopeSpecifier
bool ActOnCXXGlobalScopeSpecifier(SourceLocation CCLoc, CXXScopeSpec &SS)
The parser has parsed a global nested-name-specifier '::'.
Definition: SemaCXXScopeSpec.cpp:286
clang::Sema::ExprEvalContexts
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
A stack of expression evaluation contexts.
Definition: Sema.h:1403
clang::VarTemplateSpecializationDecl
Represents a variable template specialization, which refers to a variable template with a given set o...
Definition: DeclTemplate.h:2687
clang::Sema::ActOnOpenMPDeclareReductionDirectiveEnd
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveEnd(Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid)
Called at the end of '#pragma omp declare reduction'.
Definition: SemaOpenMP.cpp:22313
clang::Sema::AddAnyMethodToGlobalPool
void AddAnyMethodToGlobalPool(Decl *D)
AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.
Definition: SemaDeclObjC.cpp:329
clang::Sema::BuildCXXFunctionalCastExpr
ExprResult BuildCXXFunctionalCastExpr(TypeSourceInfo *TInfo, QualType Type, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
Definition: SemaCast.cpp:3311
clang::Sema::OffsetOfComponent::LocStart
SourceLocation LocStart
Definition: Sema.h:5955
clang::Sema::AFS_Global
@ AFS_Global
Only look for allocation functions in the global scope.
Definition: Sema.h:6750
clang::Sema::FinishObjCForCollectionStmt
StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body)
FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.
Definition: SemaStmt.cpp:3071
clang::Sema::ProduceTemplateArgumentSignatureHelp
QualType ProduceTemplateArgumentSignatureHelp(TemplateTy, ArrayRef< ParsedTemplateArgument >, SourceLocation LAngleLoc)
Definition: SemaCodeComplete.cpp:6381
clang::Sema::AcceptableKind
AcceptableKind
Definition: Sema.h:2262
clang::Sema::CodeCompleteObjCAtStatement
void CodeCompleteObjCAtStatement(Scope *S)
Definition: SemaCodeComplete.cpp:7287
clang::Sema::ActOnOpenMPBarrierDirective
StmtResult ActOnOpenMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp barrier'.
Definition: SemaOpenMP.cpp:11110
clang::CapturedDecl
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition: Decl.h:4521
clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope
~SynthesizedFunctionScope()
Definition: Sema.h:1086
clang::Sema::OffsetOfComponent::isBrackets
bool isBrackets
Definition: Sema.h:5956
clang::MSVtorDispMode
MSVtorDispMode
In the Microsoft ABI, this controls the placement of virtual displacement members used to implement v...
Definition: LangOptions.h:55
clang::Sema::ActOnPragmaAttributeEmptyPush
void ActOnPragmaAttributeEmptyPush(SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
Definition: SemaAttr.cpp:1075
clang::sema::BlockScopeInfo
Retains information about a block that is currently being parsed.
Definition: ScopeInfo.h:755
clang::Sema::getCurCapturedRegion
sema::CapturedRegionScopeInfo * getCurCapturedRegion()
Retrieve the current captured region, if any.
Definition: Sema.cpp:2685
clang::Sema::LookupLabel
@ LookupLabel
Label name lookup.
Definition: Sema.h:4293
clang::Sema::CheckCastAlign
void CheckCastAlign(Expr *Op, QualType T, SourceRange TRange)
CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment req...
Definition: SemaChecking.cpp:16137
clang::Sema::ImmediateDiagBuilder::operator<<
const friend ImmediateDiagBuilder & operator<<(const ImmediateDiagBuilder &Diag, const T &Value)
Teach operator<< to produce an object of the correct type.
Definition: Sema.h:1738
clang::Token
Token - This structure provides full information about a lexed token.
Definition: Token.h:35
clang::Sema::TemplateNameKindForDiagnostics::Concept
@ Concept
ASTFwd.h
clang::Sema::MarkUnusedFileScopedDecl
void MarkUnusedFileScopedDecl(const DeclaratorDecl *D)
If it's a file scoped decl that must warn if not used, keep track of it.
Definition: SemaDecl.cpp:1948
clang::Sema::PopDeclContext
void PopDeclContext()
Definition: SemaDecl.cpp:1351
clang::Sema::ActOnEndOfTranslationUnitFragment
void ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind)
Definition: Sema.cpp:1029
clang::CallExpr::ADLCallKind::NotADL
@ NotADL
clang::Sema::TemplateParamListContext
TemplateParamListContext
The context in which we are checking a template parameter list.
Definition: Sema.h:8133
clang::ImplicitTypenameContext::No
@ No
clang::Sema::BuildLambdaExpr
ExprResult BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI)
Complete a lambda-expression having processed and attached the lambda body.
Definition: SemaLambda.cpp:1790
clang::Sema::DiagnoseClassNameShadow
bool DiagnoseClassNameShadow(DeclContext *DC, DeclarationNameInfo Info)
DiagnoseClassNameShadow - Implement C++ [class.mem]p13: If T is the name of a class,...
Definition: SemaDecl.cpp:6103
clang::Sema::POAK_Natural
@ POAK_Natural
Definition: Sema.h:10576
clang::Sema::AddMethodCandidate
void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false, OverloadCandidateParamOrder PO={})
AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the gi...
Definition: SemaOverload.cpp:6997
clang::Sema::BuildLiteralOperatorCall
ExprResult BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator descri...
Definition: SemaOverload.cpp:15234
clang::Sema::LookupProtocol
ObjCProtocolDecl * LookupProtocol(IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
Find the protocol with the given name, if any.
Definition: SemaLookup.cpp:3299
clang::Sema::ActOnOpenMPMaskedTaskLoopSimdDirective
StmtResult ActOnOpenMPMaskedTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp masked taskloop simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13577
clang::Sema::NameClassification::TypeTemplate
static NameClassification TypeTemplate(TemplateName Name)
Definition: Sema.h:2710
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:144
clang::Sema::ActOnTypedefedProtocols
void ActOnTypedefedProtocols(SmallVectorImpl< Decl * > &ProtocolRefs, SmallVectorImpl< SourceLocation > &ProtocolLocs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualifi...
Definition: SemaDeclObjC.cpp:1118
clang::Sema::LOLR_Error
@ LOLR_Error
The lookup resulted in an error.
Definition: Sema.h:4365
End
SourceLocation End
Definition: USRLocFinder.cpp:167
clang::Sema::CheckPtrComparisonWithNullChar
void CheckPtrComparisonWithNullChar(ExprResult &E, ExprResult &NullE)
Definition: SemaExpr.cpp:12594
clang::Sema::PragmaAttributeEntry::MatchRules
SmallVector< attr::SubjectMatchRule, 4 > MatchRules
Definition: Sema.h:745
clang::AttributeCommonInfo::Syntax
Syntax
The style used to specify an attribute.
Definition: AttributeCommonInfo.h:25
clang::Sema::NameClassification::UndeclaredNonType
static NameClassification UndeclaredNonType()
Definition: Sema.h:2702
clang::Sema::CollectStats
bool CollectStats
Flag indicating whether or not to collect detailed statistics.
Definition: Sema.h:415
clang::Sema::isInOpenMPAssumeScope
bool isInOpenMPAssumeScope() const
Check if there is an active global omp begin assumes directive.
Definition: Sema.h:11178
clang::Sema::PendingInstantiations
std::deque< PendingImplicitInstantiation > PendingInstantiations
The queue of implicit template instantiations that are required but have not yet been performed.
Definition: Sema.h:9823
clang::Sema::OffsetOfComponent
Definition: Sema.h:5954
clang::Sema::ExternalDeclarations
SmallVector< VarDecl *, 4 > ExternalDeclarations
All the external declarations encoutered and used in the TU.
Definition: Sema.h:885
clang::Sema::ConditionKind
ConditionKind
Definition: Sema.h:12825
clang::Sema::ActOnOpenMPInteropDirective
StmtResult ActOnOpenMPInteropDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp interop'.
Definition: SemaOpenMP.cpp:17506
clang::Sema::ActOnOpenMPAffinityClause
OMPClause * ActOnOpenMPAffinityClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, Expr *Modifier, ArrayRef< Expr * > Locators)
Called on well-formed 'affinity' clause.
Definition: SemaOpenMP.cpp:23792
clang::Sema::mergeHLSLShaderAttr
HLSLShaderAttr * mergeHLSLShaderAttr(Decl *D, const AttributeCommonInfo &AL, HLSLShaderAttr::ShaderType ShaderType)
Definition: SemaDeclAttr.cpp:7089
clang::OpenMPNumTasksClauseModifier
OpenMPNumTasksClauseModifier
Definition: OpenMPKinds.h:212
clang::Sema::ActOnOpenMPParallelMasterTaskLoopDirective
StmtResult ActOnOpenMPParallelMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop' after parsing of the associated statemen...
Definition: SemaOpenMP.cpp:13627
clang::Sema::ActOnOpenMPCopyinClause
OMPClause * ActOnOpenMPCopyinClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyin' clause.
Definition: SemaOpenMP.cpp:20250
clang::Sema::IntToPointer
@ IntToPointer
IntToPointer - The assignment converts an int to a pointer, which we accept as an extension.
Definition: Sema.h:12367
clang::Sema::setExceptionMode
void setExceptionMode(SourceLocation Loc, LangOptions::FPExceptionModeKind)
Called to set exception behavior for floating point operations.
Definition: SemaAttr.cpp:1339
clang::Sema::EnterTemplatedContext
void EnterTemplatedContext(Scope *S, DeclContext *DC)
Enter a template parameter scope, after it's been associated with a particular DeclContext.
Definition: SemaDecl.cpp:1427
clang::ModuleIdPath
ArrayRef< std::pair< IdentifierInfo *, SourceLocation > > ModuleIdPath
A sequence of identifier/location pairs used to describe a particular module or submodule,...
Definition: ModuleLoader.h:32
clang::Sema::BuildExpressionFromIntegralTemplateArgument
ExprResult BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, SourceLocation Loc)
Construct a new expression that refers to the given integral template argument with the given source-...
Definition: SemaTemplate.cpp:7901
clang::Sema::ActOnPragmaWeakID
void ActOnPragmaWeakID(IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
ActOnPragmaWeakID - Called on well formed #pragma weak ident.
Definition: SemaDecl.cpp:19832
clang::Sema::VTablesUsed
llvm::DenseMap< CXXRecordDecl *, bool > VTablesUsed
The set of classes whose vtables have been used within this translation unit, and a bit that will be ...
Definition: Sema.h:7643
clang::Sema::ActOnPragmaFEnvAccess
void ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled)
ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS.
Definition: SemaAttr.cpp:1347
clang::Sema::CompoundScopeRAII
A RAII object to enter scope of a compound statement.
Definition: Sema.h:5031
clang::OpenMPSeverityClauseKind
OpenMPSeverityClauseKind
OpenMP attributes for 'severity' clause.
Definition: OpenMPKinds.h:142
clang::Sema::AR_delayed
@ AR_delayed
Definition: Sema.h:7854
clang::Sema::checkUnsafeExprAssigns
void checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS)
checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expressi...
Definition: SemaChecking.cpp:16958
clang::Sema::CodeSynthesisContextLookupModules
SmallVector< Module *, 16 > CodeSynthesisContextLookupModules
Extra modules inspected when performing a lookup during a template instantiation.
Definition: Sema.h:9370
clang::Sema::ActOnBlockError
void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope)
ActOnBlockError - If there is an error parsing a block, this callback is invoked to pop the informati...
Definition: SemaExpr.cpp:16577
clang::sema::DelayedDiagnostic
A diagnostic message which has been conditionally emitted pending the complete parsing of the current...
Definition: DelayedDiagnostic.h:124
clang::Sema::FST_Strfmon
@ FST_Strfmon
Definition: Sema.h:13570
clang::sema::CapturedRegionScopeInfo
Retains information about a captured region.
Definition: ScopeInfo.h:781
clang::Sema::FilterAcceptableTemplateNames
void FilterAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true)
Definition: SemaTemplate.cpp:146
clang::Sema::ActOnOpenMPCollapseClause
OMPClause * ActOnOpenMPCollapseClause(Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'collapse' clause.
Definition: SemaOpenMP.cpp:16589
clang::Sema::isDeclaratorFunctionLike
bool isDeclaratorFunctionLike(Declarator &D)
Determine whether.
Definition: Sema.cpp:2709
clang::Sema::ActOnClassMessage
ExprResult ActOnClassMessage(Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2756
clang::Sema::CheckObjCMethodOverrides
void CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
Definition: SemaDeclObjC.cpp:4438
clang::Sema::isUnevaluatedContext
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
Definition: Sema.h:9670
clang::Sema::DeclareImplicitMoveAssignment
CXXMethodDecl * DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit move assignment operator for the given class.
Definition: SemaDeclCXX.cpp:14777
clang::Sema::GlobalMethodPool::find
iterator find(Selector Sel)
Definition: Sema.h:1516
clang::Sema::ActOnFinishLinkageSpecification
Decl * ActOnFinishLinkageSpecification(Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpe...
Definition: SemaDeclCXX.cpp:16400
clang::Sema::CheckCaseExpression
bool CheckCaseExpression(Expr *E)
Definition: SemaExpr.cpp:21108
clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype
@ EK_Decltype
Definition: Sema.h:1331
clang::SourceManager
This class handles loading and caching of source files into memory.
Definition: SourceManager.h:638
clang::Sema::ParsingClassState
ProcessingContextState ParsingClassState
Definition: Sema.h:5336
clang::Sema::FPFeaturesStateRAII::getOverrides
FPOptionsOverride getOverrides()
Definition: Sema.h:1609
clang::Sema::isInOpenMPDeclareVariantScope
bool isInOpenMPDeclareVariantScope() const
Can we exit an OpenMP declare variant scope at the moment.
Definition: Sema.h:11041
clang::Sema::CheckOverridingFunctionReturnType
bool CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckOverridingFunctionReturnType - Checks whether the return types are covariant,...
Definition: SemaDeclCXX.cpp:17695
clang::Sema::ActOnGCCAsmStmt
StmtResult ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, unsigned NumLabels, SourceLocation RParenLoc)
Definition: SemaStmtAsm.cpp:242
clang::Sema::CheckAssignmentOperands
QualType CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:14112
clang::TypeError
TypeResult TypeError()
Definition: Ownership.h:280
clang::Sema::MarkVirtualBaseDestructorsReferenced
void MarkVirtualBaseDestructorsReferenced(SourceLocation Location, CXXRecordDecl *ClassDecl, llvm::SmallPtrSetImpl< const RecordType * > *DirectVirtualBases=nullptr)
Mark destructors of virtual bases of this class referenced.
Definition: SemaDeclCXX.cpp:5755
clang::Sema::BuildObjCObjectType
QualType BuildObjCObjectType(QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError, bool Rebuilding)
Build an Objective-C object pointer type.
Definition: SemaType.cpp:1062
clang::Sema::CheckDistantExceptionSpec
bool CheckDistantExceptionSpec(QualType T)
CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function w...
Definition: SemaExceptionSpec.cpp:189
clang::Sema::CCK_OtherCast
@ CCK_OtherCast
A cast other than a C-style cast.
Definition: Sema.h:12209
clang::Sema::CVT_Device
@ CVT_Device
Definition: Sema.h:13066
clang::Sema::ActOnDocumentableDecls
void ActOnDocumentableDecls(ArrayRef< Decl * > Group)
Definition: SemaDecl.cpp:14527
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3718
clang::Sema::ActOnUsingDeclaration
Decl * ActOnUsingDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclCXX.cpp:11839
clang::Sema::HandleDependentAccessCheck
void HandleDependentAccessCheck(const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaAccess.cpp:1508
clang::Sema::DiagnoseDependentMemberLookup
bool DiagnoseDependentMemberLookup(LookupResult &R)
Diagnose a lookup that found results in an enclosing class during error recovery.
Definition: SemaExpr.cpp:2209
clang::Sema::ActOnTranslationUnitScope
void ActOnTranslationUnitScope(Scope *S)
Definition: Sema.cpp:126
clang::Sema::ObjCArgInfo::ArgAttrs
ParsedAttributesView ArgAttrs
ArgAttrs - Attribute list for this argument.
Definition: Sema.h:10395
clang::Sema::ActOnOpenMPCriticalDirective
StmtResult ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp critical' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10825
clang::Sema::RegisterTypeTagForDatatype
void RegisterTypeTagForDatatype(const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull)
Register a magic integral constant to be used as a type tag.
Definition: SemaChecking.cpp:17524
clang::Sema::Context
ASTContext & Context
Definition: Sema.h:409
clang::Sema::CheckUnevaluatedOperand
ExprResult CheckUnevaluatedOperand(Expr *E)
Definition: SemaExprCXX.cpp:8216
clang::OMPInteropInfo
Definition: OpenMPKinds.h:220
clang::Sema::NC_Unknown
@ NC_Unknown
This name is not a type or template in this context, but might be something else.
Definition: Sema.h:2630
clang::Sema::BuildAddressSpaceAttr
QualType BuildAddressSpaceAttr(QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc)
BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated.
Definition: SemaType.cpp:6683
clang::Sema::InstantiatingTemplate::isAlreadyInstantiating
bool isAlreadyInstantiating() const
Determine whether we are already instantiating this specialization in some surrounding active instant...
Definition: Sema.h:9615
clang::Sema::ActOnCompatibilityAlias
Decl * ActOnCompatibilityAlias(SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias decl...
Definition: SemaDeclObjC.cpp:1145
clang::Sema::BuildCXXUuidof
ExprResult BuildCXXUuidof(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a Microsoft __uuidof expression with a type operand.
Definition: SemaExprCXX.cpp:742
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1566
clang::Sema::RebuildingImmediateInvocation
bool RebuildingImmediateInvocation
Whether the AST is currently being rebuilt to correct immediate invocations.
Definition: Sema.h:1044
clang::Sema::IncompatibleObjCQualifiedId
@ IncompatibleObjCQualifiedId
IncompatibleObjCQualifiedId - The assignment is between a qualified id type and something else (that ...
Definition: Sema.h:12430
clang::Sema::CheckNontrivialField
bool CheckNontrivialField(FieldDecl *FD)
Definition: SemaDecl.cpp:18123
clang::Sema::GetTypeForDeclaratorCast
TypeSourceInfo * GetTypeForDeclaratorCast(Declarator &D, QualType FromTy)
Definition: SemaType.cpp:6037
clang::Sema::ActOnPragmaOptimize
void ActOnPragmaOptimize(bool On, SourceLocation PragmaLoc)
Called on well formed #pragma clang optimize.
Definition: SemaAttr.cpp:1159
clang::Sema::PSK_Set
@ PSK_Set
Definition: Sema.h:478
clang::Sema::CheckAttrNoArgs
bool CheckAttrNoArgs(const ParsedAttr &CurrAttr)
Definition: SemaDeclAttr.cpp:2209
clang::Sema::BuildInitList
ExprResult BuildInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
Definition: SemaExpr.cpp:7641
clang::Sema::UPPC_ExceptionType
@ UPPC_ExceptionType
The type of an exception.
Definition: Sema.h:8633
clang::Sema::TypeTagData::LayoutCompatible
unsigned LayoutCompatible
If true, Type should be compared with other expression's types for layout-compatibility.
Definition: Sema.h:13675
clang::Sema::ConditionKind::Switch
@ Switch
An integral condition for a 'switch' statement.
clang::Sema::AddAssumeAlignedAttr
void AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE)
AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.
Definition: SemaDeclAttr.cpp:1678
clang::Sema::BuildFieldReferenceExpr
ExprResult BuildFieldReferenceExpr(Expr *BaseExpr, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, FieldDecl *Field, DeclAccessPair FoundDecl, const DeclarationNameInfo &MemberNameInfo)
Definition: SemaExprMember.cpp:1791
clang::Sema::UPPC_TypeConstraint
@ UPPC_TypeConstraint
A type constraint.
Definition: Sema.h:8651
clang::Sema::CodeSynthesisContext::SynthesisKind
SynthesisKind
The kind of template instantiation we are performing.
Definition: Sema.h:9192
clang::Sema::ActOnDoStmt
StmtResult ActOnDoStmt(SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
Definition: SemaStmt.cpp:1705
clang::Sema::FieldCollector
std::unique_ptr< CXXFieldCollector > FieldCollector
FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
Definition: Sema.h:843
clang::TU_Prefix
@ TU_Prefix
The translation unit is a prefix to a translation unit, and is not complete.
Definition: LangOptions.h:923
clang::Sema::AA_Sending
@ AA_Sending
Definition: Sema.h:3713
clang::Sema::CodeCompleteNamespaceDecl
void CodeCompleteNamespaceDecl(Scope *S)
Definition: SemaCodeComplete.cpp:6695
clang::Sema::anyAltivecTypes
bool anyAltivecTypes(QualType srcType, QualType destType)
Definition: SemaExpr.cpp:7978
clang::Sema::NotForRedeclaration
@ NotForRedeclaration
The lookup is a reference to this name that is not for the purpose of redeclaring the name.
Definition: Sema.h:4341
clang::Sema::ActOnOpenMPCancelDirective
StmtResult ActOnOpenMPCancelDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancel'.
Definition: SemaOpenMP.cpp:13319
clang::Sema::ActOnStringLiteral
ExprResult ActOnStringLiteral(ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e....
Definition: SemaExpr.cpp:1858
clang::Sema::ResolveAddressOfOverloadedFunction
FunctionDecl * ResolveAddressOfOverloadedFunction(Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over....
Definition: SemaOverload.cpp:12599
clang::Sema::CheckCXXDefaultArgExpr
bool CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *Init=nullptr, bool SkipImmediateInvocations=true)
Instantiate or parse a C++ default argument expression as necessary.
Definition: SemaExpr.cpp:5868
clang::Sema::ContextualImplicitConverter::diagnoseAmbiguous
virtual SemaDiagnosticBuilder diagnoseAmbiguous(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic when there are multiple possible conversion functions.
clang::Sema::PCSA_Clear
@ PCSA_Clear
Definition: Sema.h:461
clang::Sema::ActOnDefs
void ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls)
Called whenever @defs(ClassName) is encountered in the source.
Definition: SemaDeclObjC.cpp:5099
clang::Sema::ExprCleanupObjects
SmallVector< ExprWithCleanups::CleanupObject, 8 > ExprCleanupObjects
ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current f...
Definition: Sema.h:790
clang::ObjCObjectType
Represents a class type in Objective C.
Definition: Type.h:6028
clang::Sema::MatchTwoMethodDeclarations
bool MatchTwoMethodDeclarations(const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false,...
Definition: SemaDeclObjC.cpp:3258
clang::Sema::SFINAETrap
RAII class used to determine whether SFINAE has trapped any errors that occur during template argumen...
Definition: Sema.h:9732
clang::Sema::ActOnTagFinishSkippedDefinition
void ActOnTagFinishSkippedDefinition(SkippedDefinitionContext Context)
Definition: SemaDecl.cpp:1372
clang::Sema::LocalEagerInstantiationScope::perform
void perform()
Definition: Sema.h:9891
clang::Sema::DefineImplicitDestructor
void DefineImplicitDestructor(SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destruct...
Definition: SemaDeclCXX.cpp:13870
clang::Sema::MakeFullDiscardedValueExpr
FullExprArg MakeFullDiscardedValueExpr(Expr *Arg)
Definition: Sema.h:5011
clang::Sema::MissingImportKind::ExplicitSpecialization
@ ExplicitSpecialization
Offset
unsigned Offset
Definition: Format.cpp:2775
clang::Sema::PushNamespaceVisibilityAttr
void PushNamespaceVisibilityAttr(const VisibilityAttr *Attr, SourceLocation Loc)
PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.
Definition: SemaAttr.cpp:1367
clang::Sema::PushParsingClass
ParsingClassState PushParsingClass()
Definition: Sema.h:5337
clang::Sema::BuiltinRemovePointer
QualType BuiltinRemovePointer(QualType BaseType, SourceLocation Loc)
Definition: SemaType.cpp:9352
clang::Sema::CheckCallReturnType
bool CheckCallReturnType(QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
CheckCallReturnType - Checks that a call expression's return type is complete.
Definition: SemaExpr.cpp:20231
clang::Sema::MarkVirtualMembersReferenced
void MarkVirtualMembersReferenced(SourceLocation Loc, const CXXRecordDecl *RD, bool ConstexprOnly=false)
MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.
Definition: SemaDeclCXX.cpp:18087
clang::Sema::inferCUDATargetForImplicitSpecialMember
bool inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose)
Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying ...
Definition: SemaCUDA.cpp:324
clang::Sema::AddLaunchBoundsAttr
void AddLaunchBoundsAttr(Decl *D, const AttributeCommonInfo &CI, Expr *MaxThreads, Expr *MinBlocks)
AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.
Definition: SemaDeclAttr.cpp:5534
clang::Sema::WarnedStackExhausted
bool WarnedStackExhausted
Definition: Sema.h:1621
clang::sema::DelayedDiagnosticPool
A collection of diagnostics which were delayed.
Definition: DelayedDiagnostic.h:263
clang::Sema::checkFinalSuspendNoThrow
bool checkFinalSuspendNoThrow(const Stmt *FinalSuspend)
Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.
Definition: SemaCoroutine.cpp:672
clang::Sema::checkInitializerLifetime
void checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init)
Check that the lifetime of the initializer (and its subobjects) is sufficient for initializing the en...
Definition: SemaInit.cpp:7848
clang::Sema::DiagnoseEmptyLookup
bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=std::nullopt, TypoExpr **Out=nullptr)
Diagnose an empty lookup.
Definition: SemaExpr.cpp:2271
clang::EnterExpressionEvaluationContext::InitListTag
InitListTag
Definition: Sema.h:13942
clang::Sema::ActOnOpenMPExecutableDirective
StmtResult ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:6107
clang::AS_none
@ AS_none
Definition: Specifiers.h:115
clang::Sema::DiagnoseAssignmentResult
bool DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specifi...
Definition: SemaExpr.cpp:17133
clang::Sema::CUDADiagIfDeviceCode
SemaDiagnosticBuilder CUDADiagIfDeviceCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
Definition: SemaCUDA.cpp:725
clang::Sema::checkClassLevelDLLAttribute
void checkClassLevelDLLAttribute(CXXRecordDecl *Class)
Check class-level dllimport/dllexport attribute.
Definition: SemaDeclCXX.cpp:6331
clang::Sema::getAmbiguousPathsDisplayString
std::string getAmbiguousPathsDisplayString(CXXBasePaths &Paths)
Builds a string representing ambiguous paths from a specific derived class to different subobjects of...
Definition: SemaDeclCXX.cpp:3069
clang::Sema::AddPragmaAttributes
void AddPragmaAttributes(Scope *S, Decl *D)
Adds the attributes that have been specified using the '#pragma clang attribute push' directives to t...
Definition: SemaAttr.cpp:1117
clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective
StmtResult ActOnOpenMPMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13527
clang::Sema::CheckRegparmAttr
bool CheckRegparmAttr(const ParsedAttr &attr, unsigned &value)
Checks a regparm attribute, returning true if it is ill-formed and otherwise setting numParams to the...
Definition: SemaDeclAttr.cpp:5459
clang::Sema::PerformContextuallyConvertToObjCPointer
ExprResult PerformContextuallyConvertToObjCPointer(Expr *From)
PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to a...
Definition: SemaOverload.cpp:6027
clang::FixItHint
Annotates a diagnostic with some code that should be inserted, removed, or replaced to fix the proble...
Definition: Diagnostic.h:71
clang::Sema::getObjCContainerKind
ObjCContainerKind getObjCContainerKind() const
Definition: SemaDeclObjC.cpp:3821
clang::Sema::CodeSynthesisContext::DefaultTemplateArgumentInstantiation
@ DefaultTemplateArgumentInstantiation
We are instantiating a default argument for a template parameter.
Definition: Sema.h:9202
clang::Sema::CheckFieldDecl
FieldDecl * CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr)
Build a new FieldDecl and check its well-formedness.
Definition: SemaDecl.cpp:17934
clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective
StmtResult ActOnOpenMPDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for simd' after parsing of the associated stat...
Definition: SemaOpenMP.cpp:13948
clang::LateParsedTemplate::Toks
CachedTokens Toks
Definition: Sema.h:13971
clang::Sema::CheckExplicitlyDefaultedComparison
bool CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *MD, DefaultedComparisonKind DCK)
Definition: SemaDeclCXX.cpp:8557
clang::Sema::CXXMoveConstructor
@ CXXMoveConstructor
Definition: Sema.h:1548
clang::Sema::OCK_ClassExtension
@ OCK_ClassExtension
Definition: Sema.h:10177
clang::Sema::ComparisonCategoryUsage::OperatorInExpression
@ OperatorInExpression
The '<=>' operator was used in an expression and a builtin operator was selected.
clang::Sema::mergeSwiftNameAttr
SwiftNameAttr * mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA, StringRef Name)
Definition: SemaDeclAttr.cpp:4865
clang::Sema::InstantiatingTemplate::ConstraintsCheck
Definition: Sema.h:9555
clang::Sema::WeakTopLevelDecls
SmallVectorImpl< Decl * > & WeakTopLevelDecls()
WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
Definition: Sema.h:2031
clang::Sema::getLangOpts
const LangOptions & getLangOpts() const
Definition: Sema.h:1655
clang::Sema::CheckConstructor
void CheckConstructor(CXXConstructorDecl *Constructor)
CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics req...
Definition: SemaDeclCXX.cpp:10603
clang::Sema::MergeCompatibleFunctionDecls
bool MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
Completes the merge of two function declarations that are known to be compatible.
Definition: SemaDecl.cpp:4305
IsPartialSpecialization
Definition: SemaTemplateDeduction.cpp:2835
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID)
Definition: Sema.h:2491
clang::FunctionParmPackExpr
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Definition: ExprCXX.h:4480
clang::Sema::ICEConvertDiagnoser
Definition: Sema.h:3915
size_t
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
Definition: opencl-c-base.h:137
clang::Sema::NoteHiddenVirtualMethods
void NoteHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
Definition: SemaDeclCXX.cpp:10100
clang::Sema::CodeCompleteObjCPropertyGetter
void CodeCompleteObjCPropertyGetter(Scope *S)
Definition: SemaCodeComplete.cpp:7572
clang::Sema::hasReachableDefaultArgument
bool hasReachableDefaultArgument(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if the template parameter D has a reachable default argument.
Definition: SemaLookup.cpp:1664
clang::Sema::FunctionScopeRAII::disable
void disable()
Definition: Sema.h:5054
clang::Sema::CheckMatrixElementwiseOperands
QualType CheckMatrixElementwiseOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
Type checking for matrix binary operators.
Definition: SemaExpr.cpp:13414
clang::Sema::DiagnosePropertyAccessorMismatch
bool DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
Definition: SemaObjCProperty.cpp:1709
clang::Sema::OpenMPVarListDataTy::MapTypeModifiers
SmallVector< OpenMPMapModifierKind, NumberOfOMPMapClauseModifiers > MapTypeModifiers
Definition: Sema.h:11985
clang::Sema::TypeTagData::MustBeNull
unsigned MustBeNull
Definition: Sema.h:13676
clang::Sema::getPrintable
static SourceRange getPrintable(const Expr *E)
Definition: Sema.h:2192
clang::Sema::ActOnOpenMPRelaxedClause
OMPClause * ActOnOpenMPRelaxedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'relaxed' clause.
Definition: SemaOpenMP.cpp:17466
clang::Sema::SpecialMemberOverloadResult::setMethod
void setMethod(CXXMethodDecl *MD)
Definition: Sema.h:1439
clang::Sema::PCC_ParenthesizedExpression
@ PCC_ParenthesizedExpression
Code completion occurs in a parenthesized expression, which might also be a type cast.
Definition: Sema.h:13242
clang::Sema::ActOnStartFunctionDeclarationDeclarator
void ActOnStartFunctionDeclarationDeclarator(Declarator &D, unsigned TemplateParameterDepth)
Called before parsing a function declarator belonging to a function declaration.
Definition: SemaDeclCXX.cpp:18577
clang::Sema::ActOnOpenMPNontemporalClause
OMPClause * ActOnOpenMPNontemporalClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nontemporal' clause.
Definition: SemaOpenMP.cpp:23521
PrettyPrinter.h
clang::Sema::getCachedCoroNamespace
NamespaceDecl * getCachedCoroNamespace()
Definition: Sema.h:6096
clang::Sema::ExpressionEvaluationContextRecord::Lambdas
SmallVector< LambdaExpr *, 2 > Lambdas
The lambdas that are present within this context, if it is indeed an unevaluated context.
Definition: Sema.h:1299
ExprConcepts.h
clang::Sema::CodeSynthesisContext::ConstraintSubstitution
@ ConstraintSubstitution
Definition: Sema.h:9262
clang::Sema::BuildBuiltinOffsetOf
ExprResult BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
__builtin_offsetof(type, a.b[123][456].c)
Definition: SemaExpr.cpp:16209
clang::Sema::BuildOverloadedCallExpr
ExprResult BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true, bool CalleesAddressIsTaken=false)
BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the dec...
Definition: SemaOverload.cpp:13494
clang::dataflow::Literal
uint32_t Literal
Literals are represented as positive integers.
Definition: WatchedLiteralsSolver.cpp:55
clang::Sema::DefaultedComparisonKind::Equal
@ Equal
This is an operator== that should be implemented as a series of subobject comparisons.
clang::Sema::ActOnFinishFunctionBody
Decl * ActOnFinishFunctionBody(Decl *Decl, Stmt *Body)
Definition: SemaDecl.cpp:15371
clang::Sema::BuiltinChangeSignedness
QualType BuiltinChangeSignedness(QualType BaseType, UTTKind UKind, SourceLocation Loc)
Definition: SemaType.cpp:9481
clang::Sema::ActOnBlockArguments
void ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
ActOnBlockArguments - This callback allows processing of block arguments.
Definition: SemaExpr.cpp:16459
clang::StructuralEquivalenceKind::Default
@ Default
APSInt
llvm::APSInt APSInt
Definition: ByteCodeEmitter.cpp:20
clang::Sema::hasReachableDefinition
bool hasReachableDefinition(NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
Determine if D has a reachable definition.
Definition: SemaType.cpp:8861
clang::Sema::getSuperIdentifier
IdentifierInfo * getSuperIdentifier() const
Definition: Sema.cpp:2662
clang::CXXCastPath
SmallVector< CXXBaseSpecifier *, 4 > CXXCastPath
A simple array of base specifiers.
Definition: Expr.h:59
clang::Sema::getCurLexicalContext
DeclContext * getCurLexicalContext() const
Definition: Sema.h:13757
clang::Sema::CTAK_DeducedFromArrayBound
@ CTAK_DeducedFromArrayBound
The template argument was deduced from an array bound via template argument deduction.
Definition: Sema.h:8330
clang::Sema::LookupTagName
@ LookupTagName
Tag name lookup, which finds the names of enums, classes, structs, and unions.
Definition: Sema.h:4291
clang::Sema::ADLCallKind
CallExpr::ADLCallKind ADLCallKind
Definition: Sema.h:3973
clang::Sema::CodeCompleteObjCAtDirective
void CodeCompleteObjCAtDirective(Scope *S)
Definition: SemaCodeComplete.cpp:7139
clang::Sema::IsComplexPromotion
bool IsComplexPromotion(QualType FromType, QualType ToType)
Determine if a conversion is a complex promotion.
Definition: SemaOverload.cpp:2367
clang::Sema::ConstraintExpressionDependsOnEnclosingTemplate
bool ConstraintExpressionDependsOnEnclosingTemplate(const FunctionDecl *Friend, unsigned TemplateDepth, const Expr *Constraint)
Definition: SemaTemplate.cpp:1774
clang::Sema::getVariadicCallType
VariadicCallType getVariadicCallType(FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
Definition: SemaExpr.cpp:6160
clang::Sema::VarArgKind
VarArgKind
Definition: Sema.h:12285
clang::Sema::AcceptableKind::Visible
@ Visible
clang::Sema::ImmediateInvocationCandidate
llvm::PointerIntPair< ConstantExpr *, 1 > ImmediateInvocationCandidate
Definition: Sema.h:1276
clang::Sema::PragmaStack::Slot::Value
ValueType Value
Definition: Sema.h:598
clang::Sema::CodeCompleteUsing
void CodeCompleteUsing(Scope *S)
Definition: SemaCodeComplete.cpp:6645
clang::Sema::ActOnArraySubscriptExpr
ExprResult ActOnArraySubscriptExpr(Scope *S, Expr *Base, SourceLocation LLoc, MultiExprArg ArgExprs, SourceLocation RLoc)
Definition: SemaExpr.cpp:4820
clang::OpenMPLastprivateModifier
OpenMPLastprivateModifier
OpenMP 'lastprivate' clause modifier.
Definition: OpenMPKinds.h:157
clang::Sema::BuildVarTemplateInstantiation
VarTemplateSpecializationDecl * BuildVarTemplateInstantiation(VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
Definition: SemaTemplateInstantiateDecl.cpp:5110
clang::Sema::SimplerImplicitMoveMode
SimplerImplicitMoveMode
Definition: Sema.h:5176
clang::Sema::FRS_Success
@ FRS_Success
Definition: Sema.h:4170
clang::Sema::getCurFunctionDecl
FunctionDecl * getCurFunctionDecl(bool AllowLambda=false)
Returns a pointer to the innermost enclosing function, or nullptr if the current context is not insid...
Definition: Sema.cpp:1457
clang::Sema::NTK_Typedef
@ NTK_Typedef
Definition: Sema.h:3291
clang::OpenMPBindClauseKind
OpenMPBindClauseKind
OpenMP bindings for the 'bind' clause.
Definition: OpenMPKinds.h:200
clang::Sema::PoppedFunctionScopeDeleter::PoppedFunctionScopeDeleter
PoppedFunctionScopeDeleter(Sema *Self)
Definition: Sema.h:1975
clang::Sema::AddAlignValueAttr
void AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
AddAlignValueAttr - Adds an align_value attribute to a particular declaration.
Definition: SemaDeclAttr.cpp:4292
clang::Sema::ImplicitExceptionSpecification::ImplicitExceptionSpecification
ImplicitExceptionSpecification(Sema &Self)
Definition: Sema.h:6300
clang::Sema::CheckForFunctionRedefinition
void CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr, SkipBodyInfo *SkipBody=nullptr)
Definition: SemaDecl.cpp:14999
clang::Sema::CheckBitwiseOperands
QualType CheckBitwiseOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:13511
clang::Sema::ConditionResult::ConditionResult
ConditionResult()
Definition: Sema.h:12811
clang::Sema::LookupMemberName
@ LookupMemberName
Member name lookup, which finds the names of class/struct/union members.
Definition: Sema.h:4296
clang::Sema::ActOnTagDefinitionError
void ActOnTagDefinitionError(Scope *S, Decl *TagDecl)
ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a t...
Definition: SemaDecl.cpp:17712
clang::Sema::SubstTemplateName
TemplateName SubstTemplateName(NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3985
clang::Sema::OffsetOfComponent::U
union clang::Sema::OffsetOfComponent::@237 U
clang::Sema::CodeCompleteIncludedFile
void CodeCompleteIncludedFile(llvm::StringRef Dir, bool IsAngled)
Definition: SemaCodeComplete.cpp:9952
clang::Sema::DelayedDiagnostics::push
DelayedDiagnosticsState push(sema::DelayedDiagnosticPool &pool)
Enter a new scope.
Definition: Sema.h:969
clang::Sema::CodeSynthesisContext::TemplateArgs
const TemplateArgument * TemplateArgs
The list of template arguments we are substituting, if they are not part of the entity.
Definition: Sema.h:9311
clang::FunctionTemplateDecl
Declaration of a template function.
Definition: DeclTemplate.h:1005
clang::Sema::mergeImportNameAttr
WebAssemblyImportNameAttr * mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL)
Definition: SemaDeclAttr.cpp:7578
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type T is a complete type.
Definition: SemaType.cpp:8722
clang::Sema::StringWithUTF8StringMethod
ObjCMethodDecl * StringWithUTF8StringMethod
The declaration of the stringWithUTF8String: method.
Definition: Sema.h:1197
clang::Sema::mergeMinSizeAttr
MinSizeAttr * mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI)
Definition: SemaDeclAttr.cpp:4852
clang::Sema::ContextualImplicitConverter::diagnoseExplicitConv
virtual SemaDiagnosticBuilder diagnoseExplicitConv(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
Emits a diagnostic when the only matching conversion function is explicit.
clang::Sema::ActOnModuleDecl
DeclGroupPtrTy ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState)
The parser has processed a module-declaration that begins the definition of a module interface or imp...
Definition: SemaModule.cpp:168
clang::LazyOffsetPtr< Decl, uint32_t, &ExternalASTSource::GetExternalDecl >
clang::Sema::OpenMPVarListDataTy::DepModOrTailExpr
Expr * DepModOrTailExpr
Definition: Sema.h:11976
clang::Sema::PushSatisfactionStackEntry
void PushSatisfactionStackEntry(const NamedDecl *D, const llvm::FoldingSetNodeID &ID)
Definition: Sema.h:7292
clang::Sema::CheckTollFreeBridgeStaticCast
bool CheckTollFreeBridgeStaticCast(QualType castType, Expr *castExpr, CastKind &Kind)
Definition: SemaExprObjC.cpp:4202
llvm::MutableArrayRef< ImplicitConversionSequence >
clang::Sema::ActOnOpenMPUseDeviceAddrClause
OMPClause * ActOnOpenMPUseDeviceAddrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_addr' clause.
Definition: SemaOpenMP.cpp:23237
clang::Sema::CXXDestructor
@ CXXDestructor
Definition: Sema.h:1551
clang::Sema::SFINAETrap::~SFINAETrap
~SFINAETrap()
Definition: Sema.h:9753
clang::Sema::NSArrayDecl
ObjCInterfaceDecl * NSArrayDecl
The declaration of the Objective-C NSArray class.
Definition: Sema.h:1203
clang::Sema::CheckDerivedToBaseConversion
bool CheckDerivedToBaseConversion(QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false)
Definition: SemaDeclCXX.cpp:3046
clang::Sema::ExpressionEvaluationContextRecord::ImmediateInvocationCandidates
llvm::SmallVector< ImmediateInvocationCandidate, 4 > ImmediateInvocationCandidates
Set of candidates for starting an immediate invocation.
Definition: Sema.h:1322
clang::Sema::DiagnoseInvalidJumps
void DiagnoseInvalidJumps(Stmt *Body)
Definition: JumpDiagnostics.cpp:1018
clang::Sema::DiagnoseMissingDesignatedInitOverrides
void DiagnoseMissingDesignatedInitOverrides(const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
Definition: SemaObjCProperty.cpp:2316
clang::Sema::SemaDiagnosticBuilder::StmtError
friend StmtResult StmtError(const SemaDiagnosticBuilder &)
Definition: Sema.h:1850
clang::Sema::CreateOverloadedArraySubscriptExpr
ExprResult CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg Args)
Definition: SemaOverload.cpp:14371
clang::Sema::LookupVisibleDecls
void LookupVisibleDecls(Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true, bool LoadExternal=true)
Definition: SemaLookup.cpp:4430
clang::Sema::CheckRemainderOperands
QualType CheckRemainderOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
Definition: SemaExpr.cpp:11090
clang::Sema::TAH_IgnoreTrivialABI
@ TAH_IgnoreTrivialABI
The triviality of a method unaffected by "trivial_abi".
Definition: Sema.h:3382
clang::Sema::CheckVecStepExpr
bool CheckVecStepExpr(Expr *E)
Definition: SemaExpr.cpp:4475
clang::Sema::ActOnLambdaError
void ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the informa...
Definition: SemaLambda.cpp:1287
V
#define V(N, I)
Definition: ASTContext.h:3212
clang::Sema::BuildTypeofExprType
QualType BuildTypeofExprType(Expr *E, TypeOfKind Kind)
Definition: SemaType.cpp:9213
clang::Sema::BuildAnonymousStructUnionMemberReference
ExprResult BuildAnonymousStructUnionMemberReference(const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
Definition: SemaExprMember.cpp:802
clang::Sema::tryExprAsCall
bool tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
Figure out if an expression could be turned into a call.
Definition: Sema.cpp:2434
clang::Sema::ModuleImportState::ImportFinished
@ ImportFinished
after any non-import decl.
clang::Sema::NC_OverloadSet
@ NC_OverloadSet
The name was classified as an overload set, and an expression representing that overload set has been...
Definition: Sema.h:2653
clang::Sema::ActOnNestedRequirement
concepts::Requirement * ActOnNestedRequirement(Expr *Constraint)
Definition: SemaExprCXX.cpp:9077
clang::Sema::VariadicFunction
@ VariadicFunction
Definition: Sema.h:12272
clang::Sema::OpenMPVarListDataTy
Data used for processing a list of variables in OpenMP clauses.
Definition: Sema.h:11975
clang::Sema::ActOnOpenMPSIMDClause
OMPClause * ActOnOpenMPSIMDClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'simd' clause.
Definition: SemaOpenMP.cpp:17476
clang::Sema::TypeDiagnoser::TypeDiagnoser
TypeDiagnoser()
Definition: Sema.h:2173
clang::Sema::BuildParenType
QualType BuildParenType(QualType T)
Build a paren type including T.
Definition: SemaType.cpp:2025
clang::ast_matchers::expr
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
Definition: ASTMatchersInternal.cpp:891
clang::Sema::NonInstantiationEntries
unsigned NonInstantiationEntries
The number of CodeSynthesisContexts that are not template instantiations and, therefore,...
Definition: Sema.h:9400
clang::Sema::ActOnOpenMPBeginDeclareVariant
void ActOnOpenMPBeginDeclareVariant(SourceLocation Loc, OMPTraitInfo &TI)
Handle a omp begin declare variant.
Definition: SemaOpenMP.cpp:2683
clang::Sema::getShadowedDeclaration
NamedDecl * getShadowedDeclaration(const TypedefNameDecl *D, const LookupResult &R)
Return the declaration shadowed by the given typedef D, or null if it doesn't shadow any declaration ...
Definition: SemaDecl.cpp:8146
clang::Sema::NestedNameSpecInfo::IdentifierLoc
SourceLocation IdentifierLoc
The location of the identifier.
Definition: Sema.h:6933
clang::ast_matchers::attr
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
Definition: ASTMatchersInternal.cpp:1032
clang::ParameterABI
ParameterABI
Kinds of parameter ABI.
Definition: Specifiers.h:348
clang::Sema::LookupMethodInQualifiedType
ObjCMethodDecl * LookupMethodInQualifiedType(Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective...
Definition: SemaExprObjC.cpp:1958
clang::Sema::getEnclosingLambda
sema::LambdaScopeInfo * getEnclosingLambda() const
Get the innermost lambda enclosing the current location, if any.
Definition: Sema.cpp:2330
clang::Sema::ActOnObjCAtCatchStmt
StmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc, SourceLocation RParen, Decl *Parm, Stmt *Body)
Definition: SemaStmt.cpp:4196
clang::Sema::RebuildExprInCurrentInstantiation
ExprResult RebuildExprInCurrentInstantiation(Expr *E)
Definition: SemaTemplate.cpp:11196
clang::Sema::isPreciseFPEnabled
bool isPreciseFPEnabled()
Are precise floating point semantics currently enabled?
Definition: Sema.h:10673
clang::Sema::BuildIvarRefExpr
ExprResult BuildIvarRefExpr(Scope *S, SourceLocation Loc, ObjCIvarDecl *IV)
Definition: SemaExpr.cpp:2901
clang::Sema::isQualifiedMemberAccess
bool isQualifiedMemberAccess(Expr *E)
Determine whether the given expression is a qualified member access expression, of a form that could ...
Definition: SemaExpr.cpp:16020
clang::Sema::ExpressionEvaluationContext::UnevaluatedList
@ UnevaluatedList
The current expression occurs within a braced-init-list within an unevaluated operand.
clang::Sema::CodeSynthesisContext::Template
NamedDecl * Template
The template (or partial specialization) in which we are performing the instantiation,...
Definition: Sema.h:9306
clang::Sema::DelayedOverridingExceptionSpecChecks
SmallVector< std::pair< const CXXMethodDecl *, const CXXMethodDecl * >, 2 > DelayedOverridingExceptionSpecChecks
All the overriding functions seen during a class definition that had their exception spec checks dela...
Definition: Sema.h:907
clang::Sema::AttributeCompletion
AttributeCompletion
Definition: Sema.h:13272
clang::Sema::CheckVarTemplateId
DeclResult CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
Get the specialization of the given variable template corresponding to the specified argument list,...
Definition: SemaTemplate.cpp:4673
clang::Sema::ValueWithBytesObjCTypeMethod
ObjCMethodDecl * ValueWithBytesObjCTypeMethod
The declaration of the valueWithBytes:objCType: method.
Definition: Sema.h:1200
clang::Sema::ShouldEnterDeclaratorScope
bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
Definition: SemaCXXScopeSpec.cpp:1041
clang::Sema::RequiredTemplateKind::hasTemplateKeyword
bool hasTemplateKeyword() const
Definition: Sema.h:8000
clang::Sema::ActOnObjCAvailabilityCheckExpr
ExprResult ActOnObjCAvailabilityCheckExpr(llvm::ArrayRef< AvailabilitySpec > AvailSpecs, SourceLocation AtLoc, SourceLocation RParen)
Definition: SemaExpr.cpp:21137
clang::Sema::CodeCompleteNamespaceAliasDecl
void CodeCompleteNamespaceAliasDecl(Scope *S)
Definition: SemaCodeComplete.cpp:6743
clang::Sema::FindCompositePointerType
QualType FindCompositePointerType(SourceLocation Loc, Expr *&E1, Expr *&E2, bool ConvertArgs=true)
Find a merged pointer type and convert the two expressions to it.
Definition: SemaExprCXX.cpp:6784
clang::Sema::getPrintable
static SourceRange getPrintable(SourceRange R)
Definition: Sema.h:2190
clang::Sema::ActOnOpenMPSingleExprClause
OMPClause * ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:15173
clang::PragmaFloatControlKind
PragmaFloatControlKind
Definition: PragmaKinds.h:28
clang::RecordType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4823
clang::Sema::AttachBaseSpecifiers
bool AttachBaseSpecifiers(CXXRecordDecl *Class, MutableArrayRef< CXXBaseSpecifier * > Bases)
Performs the actual work of attaching the given base class specifiers to a C++ class.
Definition: SemaDeclCXX.cpp:2761
clang::Sema::BuildCXXTypeConstructExpr
ExprResult BuildCXXTypeConstructExpr(TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc, bool ListInitialization)
Definition: SemaExprCXX.cpp:1455
clang::Sema::CTAK_Specified
@ CTAK_Specified
The template argument was specified in the code or was instantiated with some deduced template argume...
Definition: Sema.h:8322
clang::Sema::CodeSynthesisContext::ExceptionSpecInstantiation
@ ExceptionSpecInstantiation
We are instantiating the exception specification for a function template which was deferred until it ...
Definition: Sema.h:9235
clang::Sema::computeNRVO
void computeNRVO(Stmt *Body, sema::FunctionScopeInfo *Scope)
Given the set of return statements within a function body, compute the variables that are subject to ...
Definition: SemaDecl.cpp:15308
clang::PreferredTypeBuilder::enterFunctionArgument
void enterFunctionArgument(SourceLocation Tok, llvm::function_ref< QualType()> ComputeType)
Computing a type for the function argument may require running overloading, so we postpone its comput...
Definition: SemaCodeComplete.cpp:429
clang::Sema::BuildCXXNamedCast
ExprResult BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens)
Definition: SemaCast.cpp:296
clang::Sema::ActOnOpenMPCompareClause
OMPClause * ActOnOpenMPCompareClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'compare' clause.
Definition: SemaOpenMP.cpp:17441
clang::Sema::SaveNestedNameSpecifierAnnotation
void * SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS)
Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to recon...
Definition: SemaCXXScopeSpec.cpp:1014
clang::Module
Describes a module or submodule.
Definition: Module.h:98
clang::Sema::ActOnGotoStmt
StmtResult ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *TheDecl)
Definition: SemaStmt.cpp:3282
clang::Sema::VariadicDoesNotApply
@ VariadicDoesNotApply
Definition: Sema.h:12276
clang::Sema::DeclareTargetContextInfo::MapInfo::MT
OMPDeclareTargetDeclAttr::MapTypeTy MT
Definition: Sema.h:10928
clang::Sema::CheckOpenMPLinearModifier
bool CheckOpenMPLinearModifier(OpenMPLinearClauseKind LinKind, SourceLocation LinLoc)
Checks correctness of linear modifiers.
Definition: SemaOpenMP.cpp:19887
clang::Sema::CurFPFeatures
FPOptions CurFPFeatures
Definition: Sema.h:405
clang::Sema::ActOnNameClassifiedAsUndeclaredNonType
ExprResult ActOnNameClassifiedAsUndeclaredNonType(IdentifierInfo *Name, SourceLocation NameLoc)
Act on the result of classifying a name as an undeclared (ADL-only) non-type declaration.
Definition: SemaDecl.cpp:1264
DeclTemplate.h
clang::Sema::CodeCompleteFunctionQualifiers
void CodeCompleteFunctionQualifiers(DeclSpec &DS, Declarator &D, const VirtSpecifiers *VS=nullptr)
Definition: SemaCodeComplete.cpp:5871
clang::Sema::ConstantFoldAttrArgs
bool ConstantFoldAttrArgs(const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
ConstantFoldAttrArgs - Folds attribute arguments into ConstantExprs (unless they are value dependent ...
Definition: SemaAttr.cpp:390
clang::Sema::ObjCContainerKind
ObjCContainerKind
Definition: Sema.h:10172
clang::Sema::inTemplateInstantiation
bool inTemplateInstantiation() const
Determine whether we are currently performing template instantiation.
Definition: Sema.h:9641
clang::Sema::SkipBodyInfo::New
NamedDecl * New
Definition: Sema.h:2589
clang::Sema::ActOnCapturedRegionError
void ActOnCapturedRegionError()
Definition: SemaStmt.cpp:4789
clang::Sema::SpecialMemberOverloadResult::SpecialMemberOverloadResult
SpecialMemberOverloadResult()
Definition: Sema.h:1434
clang::FileNullabilityMap::operator[]
FileNullability & operator[](FileID file)
Definition: Sema.h:278
clang::OpenMPLinearClauseKind
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
Definition: OpenMPKinds.h:62
clang::PreferredTypeBuilder::enterVariableInit
void enterVariableInit(SourceLocation Tok, Decl *D)
Definition: SemaCodeComplete.cpp:408
clang::Sema::ActOnOpenMPPartialClause
OMPClause * ActOnOpenMPPartialClause(Expr *FactorExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'partial' clauses.
Definition: SemaOpenMP.cpp:16971
clang::Sema::SkipBodyInfo::ShouldSkip
bool ShouldSkip
Definition: Sema.h:2586
clang::Sema::OS_Dictionary
@ OS_Dictionary
Definition: Sema.h:3945
clang::Sema::ExpressionEvaluationContextRecord::InitializationContext::Loc
SourceLocation Loc
Definition: Sema.h:1352
clang::Sema::MakeFullExpr
FullExprArg MakeFullExpr(Expr *Arg, SourceLocation CC)
Definition: Sema.h:5007
clang::Sema::ActOnClassPropertyRefExpr
ExprResult ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
Definition: SemaExprObjC.cpp:2157
clang::interp::Opcode
Opcode
Definition: Opcode.h:21
clang::Sema::UPPC_Block
@ UPPC_Block
Block expression.
Definition: Sema.h:8648
clang::Sema::isModuleUnitOfCurrentTU
bool isModuleUnitOfCurrentTU(const Module *M) const
Definition: SemaModule.cpp:991
clang::Sema::ActOnPragmaMSAllocText
void ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector< std::tuple< IdentifierInfo *, SourceLocation >> &Functions)
Called on well-formed #pragma alloc_text().
Definition: SemaAttr.cpp:806
clang::Sema::CheckConceptRedefinition
void CheckConceptRedefinition(ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope)
Definition: SemaTemplate.cpp:8988
clang::Sema::ActOnOpenMPScheduleClause
OMPClause * ActOnOpenMPScheduleClause(OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'schedule' clause.
Definition: SemaOpenMP.cpp:17168
clang::UnresolvedLookupExpr
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3147
clang::Sema::TPC_TypeAliasTemplate
@ TPC_TypeAliasTemplate
Definition: Sema.h:8141
clang::Sema::EmitRelatedResultTypeNoteForReturn
void EmitRelatedResultTypeNoteForReturn(QualType destType)
Given that we had incompatible pointer types in a return statement, check whether we're in a method w...
Definition: SemaExprObjC.cpp:1655
clang::Sema::CheckVirtualDtorCall
void CheckVirtualDtorCall(CXXDestructorDecl *dtor, SourceLocation Loc, bool IsDelete, bool CallCanBeVirtual, bool WarnOnNonAbstractTypes, SourceLocation DtorLoc)
Definition: SemaExprCXX.cpp:3932
clang::Sema::PSK_Reset
@ PSK_Reset
Definition: Sema.h:477
clang::Sema::CodeSynthesisContext::isInstantiationRecord
bool isInstantiationRecord() const
Determines whether this template is an actual instantiation that should be counted toward the maximum...
Definition: SemaTemplateInstantiate.cpp:343
clang::Sema::ActOnOpenMPTeamsDistributeDirective
StmtResult ActOnOpenMPTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:14172
clang::Sema::ActOnTagFinishDefinition
void ActOnTagFinishDefinition(Scope *S, Decl *TagDecl, SourceRange BraceRange)
ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration...
Definition: SemaDecl.cpp:17637
clang::RequiresExprBodyDecl
Represents the body of a requires-expression.
Definition: DeclCXX.h:1973
clang::Sema::CodeCompleteQualifiedId
void CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS, bool EnteringContext, bool IsUsingDeclaration, QualType BaseType, QualType PreferredType)
Definition: SemaCodeComplete.cpp:6552
clang::PartialDiagnosticAt
std::pair< SourceLocation, PartialDiagnostic > PartialDiagnosticAt
A partial diagnostic along with the source location where this diagnostic occurs.
Definition: PartialDiagnostic.h:205
clang::Sema::TentativeDefinitions
TentativeDefinitionsType TentativeDefinitions
All the tentative definitions encountered in the TU.
Definition: Sema.h:882
clang::Sema::getDiagnostics
DiagnosticsEngine & getDiagnostics() const
Definition: Sema.h:1659
clang::Sema::ActOnStartSEHFinallyBlock
void ActOnStartSEHFinallyBlock()
Definition: SemaStmt.cpp:4585
clang::Sema::UPPC_Initializer
@ UPPC_Initializer
An initializer.
Definition: Sema.h:8624
clang::Sema::CodeCompletePreprocessorDirective
void CodeCompletePreprocessorDirective(bool InConditional)
Definition: SemaCodeComplete.cpp:9712
clang::TemplateArgumentListInfo
A convenient class for passing around template argument information.
Definition: TemplateBase.h:590
clang::Sema::CoroTraitsNamespaceCache
NamespaceDecl * CoroTraitsNamespaceCache
The namespace where coroutine components are defined.
Definition: Sema.h:1160
clang::Sema::MarkAnyDeclReferenced
void MarkAnyDeclReferenced(SourceLocation Loc, Decl *D, bool MightBeOdrUse)
Perform marking for a reference to an arbitrary declaration.
Definition: SemaExpr.cpp:20031
clang::Sema::ArgumentPackSubstitutionIndexRAII
RAII object used to change the argument pack substitution index within a Sema object.
Definition: Sema.h:9430
clang::Sema::PragmaStackSentinelRAII
Definition: Sema.h:717
clang::Sema::MaybeAddCUDAConstantAttr
void MaybeAddCUDAConstantAttr(VarDecl *VD)
May add implicit CUDAConstantAttr attribute to VD, depending on VD and current compilation settings.
Definition: SemaCUDA.cpp:711
StmtOpenMP.h
clang::DeclAccessPair::make
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
Definition: DeclAccessPair.h:35
clang::Sema::ActOnObjCBridgedCast
ExprResult ActOnObjCBridgedCast(Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
Definition: SemaExprObjC.cpp:4743
clang::Sema::ContextRAII::ContextRAII
ContextRAII(Sema &S, DeclContext *ContextToPush, bool NewThisContext=true)
Definition: Sema.h:1010
clang::Sema::ACR_okay
@ ACR_okay
Definition: Sema.h:12731
clang::Sema::ActOnCaseStmtBody
void ActOnCaseStmtBody(Stmt *CaseStmt, Stmt *SubStmt)
ActOnCaseStmtBody - This installs a statement as the body of a case.
Definition: SemaStmt.cpp:535
clang::Sema::ActOnTypeName
TypeResult ActOnTypeName(Scope *S, Declarator &D)
Definition: SemaType.cpp:6593
clang::Sema::CurFPFeatureOverrides
FPOptionsOverride CurFPFeatureOverrides()
Definition: Sema.h:705
clang::Sema::TemplateParameterListsAreEqual
bool TemplateParameterListsAreEqual(const NamedDecl *NewInstFrom, TemplateParameterList *New, const NamedDecl *OldInstFrom, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation(), bool PartialOrdering=false)
Determine whether the given template parameter lists are equivalent.
Definition: SemaTemplate.cpp:8140
clang::Sema::VarsWithInheritedDSAType
llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 > VarsWithInheritedDSAType
Definition: Sema.h:11316
clang::Sema::DeferDiagsRAII
RAII class to control scope of DeferDiags.
Definition: Sema.h:1891
clang::Sema::UsesAllocatorsData::RParenLoc
SourceLocation RParenLoc
Definition: Sema.h:12175
clang::Sema::ActOnPseudoDestructorExpr
ExprResult ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName)
Definition: SemaExprCXX.cpp:7833
clang::Sema::NameClassification
Definition: Sema.h:2666
clang::Sema::CFT_HostDevice
@ CFT_HostDevice
Definition: Sema.h:13052
clang::TagTypeKind
TagTypeKind
The kind of a tag type.
Definition: Type.h:5547
clang::Sema::ActOnOpenMPDepobjDirective
StmtResult ActOnOpenMPDepobjDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp depobj'.
Definition: SemaOpenMP.cpp:11217
clang::Sema::PCC_Class
@ PCC_Class
Code completion occurs within a class, struct, or union.
Definition: Sema.h:13207
clang::Sema::diagnoseARCUnbridgedCast
void diagnoseARCUnbridgedCast(Expr *e)
Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.
Definition: SemaExprObjC.cpp:4506
clang::Sema::CheckMatrixCast
bool CheckMatrixCast(SourceRange R, QualType DestTy, QualType SrcTy, CastKind &Kind)
Definition: SemaExpr.cpp:8058
clang::Sema::ActOnOpenMPPriorityClause
OMPClause * ActOnOpenMPPriorityClause(Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'priority' clause.
Definition: SemaOpenMP.cpp:22540
clang::Sema::ActOnClassTemplateSpecialization
DeclResult ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody=nullptr)
Definition: SemaTemplate.cpp:8549
clang::Sema::ActOnChooseExpr
ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc)
Definition: SemaExpr.cpp:16391
clang::Sema::ActOnCXXExitDeclaratorScope
void ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclarato...
Definition: SemaCXXScopeSpec.cpp:1117
clang::Sema::ActOnOpenMPToClause
OMPClause * ActOnOpenMPToClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
Called on well-formed 'to' clause.
Definition: SemaOpenMP.cpp:23078
clang::Sema::UnusedFileScopedDeclsType
LazyVector< const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > UnusedFileScopedDeclsType
Definition: Sema.h:889
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4332
clang::Sema::BuildAnonymousStructOrUnion
Decl * BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union.
Definition: SemaDecl.cpp:5476
clang::Sema::ActOnCUDAExecConfigExpr
ExprResult ActOnCUDAExecConfigExpr(Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc)
Definition: SemaCUDA.cpp:50
clang::Sema::UpdateExceptionSpec
void UpdateExceptionSpec(FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
Definition: SemaExceptionSpec.cpp:243
clang::PreferredTypeBuilder::get
QualType get(SourceLocation Tok) const
Get the expected type associated with this location, if any.
Definition: Sema.h:336
clang::Sema::MergeVarDecl
void MergeVarDecl(VarDecl *New, LookupResult &Previous)
MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declar...
Definition: SemaDecl.cpp:4511
clang::Sema::EmitRelatedResultTypeNote
void EmitRelatedResultTypeNote(const Expr *E)
If the given expression involves a message send to a method with a related result type,...
Definition: SemaExprObjC.cpp:1684
clang::Sema::CheckMemberAccess
AccessResult CheckMemberAccess(SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
Checks access to a member.
Definition: SemaAccess.cpp:1736
clang::Sema::ActOnLastBitfield
void ActOnLastBitfield(SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions.
Definition: SemaDecl.cpp:18313
clang::Sema::DiagnoseUseOfOverloadedDecl
bool DiagnoseUseOfOverloadedDecl(NamedDecl *D, SourceLocation Loc)
Definition: Sema.h:5369
clang::Sema::CXXMoveAssignment
@ CXXMoveAssignment
Definition: Sema.h:1550
clang::Sema::ActOnDesignatedInitializer
ExprResult ActOnDesignatedInitializer(Designation &Desig, SourceLocation EqualOrColonLoc, bool GNUSyntax, ExprResult Init)
Definition: SemaInit.cpp:3212
clang::Sema::diagnoseUnavailableAlignedAllocation
void diagnoseUnavailableAlignedAllocation(const FunctionDecl &FD, SourceLocation Loc)
Produce diagnostics if FD is an aligned allocation or deallocation function that is unavailable.
Definition: SemaExprCXX.cpp:1951
clang::Sema::Ref_Incompatible
@ Ref_Incompatible
Ref_Incompatible - The two types are incompatible, so direct reference binding is not possible.
Definition: Sema.h:12656
clang::Sema::CreatePropertyDecl
ObjCPropertyDecl * CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl fo...
Definition: SemaObjCProperty.cpp:558
clang::ExceptionSpecificationType
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
Definition: ExceptionSpecificationType.h:20
clang::Sema::CheckPureMethod
bool CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange)
Mark the given method pure.
Definition: SemaDeclCXX.cpp:17806
clang::Sema::ActOnFinishDelayedMemberInitializers
void ActOnFinishDelayedMemberInitializers(Decl *Record)
Definition: SemaDeclCXX.cpp:13624
clang::Sema::ActOnBuiltinOffsetOf
ExprResult ActOnBuiltinOffsetOf(Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
Definition: SemaExpr.cpp:16372
clang::Sema::ACK_BitwiseOp
@ ACK_BitwiseOp
A bitwise operation.
Definition: Sema.h:12335
clang::Sema::canCalleeThrow
static CanThrowResult canCalleeThrow(Sema &S, const Expr *E, const Decl *D, SourceLocation Loc=SourceLocation())
Determine whether the callee of a particular function call can throw.
Definition: SemaExceptionSpec.cpp:1008
clang::Sema::AddImplicitlyDeclaredMembersToClass
void AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl)
AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions,...
Definition: SemaDeclCXX.cpp:10272
clang::Sema::HandleExprPropertyRefExpr
ExprResult HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
Definition: SemaExprObjC.cpp:1974
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Definition: Sema.h:2487
clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder
~SemaDiagnosticBuilder()
Definition: Sema.cpp:1845
clang::Sema::ActOnFinishNamespaceDef
void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace)
ActOnFinishNamespaceDef - This callback is called after a namespace is exited.
Definition: SemaDeclCXX.cpp:11364
clang::Sema::CheckFunctionDeclaration
bool CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization, bool DeclIsDefn)
Perform semantic checking of a new function declaration.
Definition: SemaDecl.cpp:11605
clang::Sema::DeviceDeferredDiags
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, std::vector< PartialDiagnosticAt > > DeviceDeferredDiags
Diagnostics that are emitted only if we discover that the given function must be codegen'ed.
Definition: Sema.h:12953
clang::OMPClause
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:55
clang::Sema::ActOnOpenMPMasterTaskLoopDirective
StmtResult ActOnOpenMPMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13451
clang::DiagnosticBuilder::Clear
void Clear() const
Clear out the current diagnostic.
Definition: Diagnostic.h:1298
clang::Sema::CheckObjCBridgeRelatedConversions
bool CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose=true)
Definition: SemaExprObjC.cpp:4293
clang::Sema::SemaDiagnosticBuilder::isImmediate
bool isImmediate() const
Definition: Sema.h:1793
clang::Sema::InstantiateExceptionSpec
void InstantiateExceptionSpec(SourceLocation PointOfInstantiation, FunctionDecl *Function)
Definition: SemaTemplateInstantiateDecl.cpp:4576
clang::Sema::CreateParsedType
ParsedType CreateParsedType(QualType T, TypeSourceInfo *TInfo)
Package the given type and TSI into a ParsedType.
Definition: SemaType.cpp:6574
Id
int Id
Definition: ASTDiff.cpp:190
clang::Sema::CheckObjCBridgeRelatedCast
void CheckObjCBridgeRelatedCast(QualType castType, Expr *castExpr)
Definition: SemaExprObjC.cpp:4181
clang::Sema::ActOnPragmaOptionsAlign
void ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
Definition: SemaAttr.cpp:218
clang::Sema::ForRangeStatus
ForRangeStatus
Definition: Sema.h:4169
clang::FunctionProtoType::ExceptionSpecInfo
Holds information about the various types of exception specification.
Definition: Type.h:4080
clang::Sema::hasUncompilableErrorOccurred
bool hasUncompilableErrorOccurred() const
Whether uncompilable error has occurred.
Definition: Sema.cpp:1585
clang::Sema::ProcessDeclAttributeDelayed
void ProcessDeclAttributeDelayed(Decl *D, const ParsedAttributesView &AttrList)
Definition: SemaDeclAttr.cpp:9439
clang::Sema::CodeCompleteObjCAtVisibility
void CodeCompleteObjCAtVisibility(Scope *S)
Definition: SemaCodeComplete.cpp:7276
clang::format::encoding::Encoding
Encoding
Definition: Encoding.h:27
clang::Sema::CheckTemplateDeclScope
bool CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams)
Check whether a template can be declared within this scope.
Definition: SemaTemplate.cpp:8242
hlsl::uint64_t
unsigned long uint64_t
Definition: hlsl_basic_types.h:25
clang::Sema::lookupCoroutineTraits
ClassTemplateDecl * lookupCoroutineTraits(SourceLocation KwLoc, SourceLocation FuncLoc, NamespaceDecl *&Namespace)
Lookup 'coroutine_traits' in std namespace and std::experimental namespace.
Definition: SemaCoroutine.cpp:1844
clang::Sema::StdSourceLocationImplDecl
RecordDecl * StdSourceLocationImplDecl
The C++ "std::source_location::__impl" struct, defined in <source_location>.
Definition: Sema.h:1170
clang::Sema::CodeSynthesisContext::RequirementParameterInstantiation
@ RequirementParameterInstantiation
Definition: Sema.h:9268
clang::Sema::DiagnoseEmptyLoopBody
void DiagnoseEmptyLoopBody(const Stmt *S, const Stmt *PossibleBody)
Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statem...
Definition: SemaChecking.cpp:17074
clang::MemInitResult
ActionResult< CXXCtorInitializer * > MemInitResult
Definition: Ownership.h:266
clang::ConceptDecl
Declaration of a C++20 concept.
Definition: DeclTemplate.h:3275
clang::Sema::OffsetOfComponent::LocEnd
SourceLocation LocEnd
Definition: Sema.h:5955
clang::Sema::MergeCXXFunctionDecl
bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S)
MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that the...
Definition: SemaDeclCXX.cpp:462
clang::Sema::UnexpandedParameterPackContext
UnexpandedParameterPackContext
The context in which an unexpanded parameter pack is being diagnosed.
Definition: Sema.h:8589
clang::Sema::ActOnCXXForRangeStmt
StmtResult ActOnCXXForRangeStmt(Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind)
ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.
Definition: SemaStmt.cpp:2482
clang::Scope
Scope - A scope is a transient data structure that is used while parsing the program.
Definition: Scope.h:41
clang::Sema::ContextualImplicitConverter::noteExplicitConv
virtual SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
Emits a note for the explicit conversion function.
clang::Sema::EnterDeclaratorContext
void EnterDeclaratorContext(Scope *S, DeclContext *DC)
EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name ...
Definition: SemaDecl.cpp:1379
clang::Sema::TypoCorrectedFunctionDefinitions
llvm::SmallPtrSet< const NamedDecl *, 4 > TypoCorrectedFunctionDefinitions
The function definitions which were renamed as part of typo-correction to match their respective decl...
Definition: Sema.h:1585
clang::Sema::DefaultedFunctionKind::isComparison
bool isComparison() const
Definition: Sema.h:3407
clang::Sema::ICEConvertDiagnoser::match
bool match(QualType T) override
Match an integral or (possibly scoped) enumeration type.
Definition: SemaOverload.cpp:6041
clang::CanThrowResult
CanThrowResult
Possible results from evaluation of a noexcept expression.
Definition: ExceptionSpecificationType.h:54
clang::Sema::LookupCopyingConstructor
CXXConstructorDecl * LookupCopyingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the copying constructor for the given class.
Definition: SemaLookup.cpp:3552
clang::Sema::SemaDiagnosticBuilder::K_Nop
@ K_Nop
Emit no diagnostics.
Definition: Sema.h:1774
clang::OpenMPDefaultmapClauseKind
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
Definition: OpenMPKinds.h:110
clang::Sema::BuildExpressionFromDeclTemplateArgument
ExprResult BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
Given a non-type template argument that refers to a declaration and the type of its corresponding non...
Definition: SemaTemplate.cpp:7791
clang::Sema::FST_OSLog
@ FST_OSLog
Definition: Sema.h:13574
clang::Sema::CheckCategoryVsClassMethodMatches
void CheckCategoryVsClassMethodMatches(ObjCCategoryImplDecl *CatIMP)
CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those im...
Definition: SemaDeclObjC.cpp:2942
clang::Sema::CheckMemberSpecialization
bool CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous)
Perform semantic analysis for the given non-template member specialization.
Definition: SemaTemplate.cpp:9562
clang::Sema::tryCaptureObjCSelf
ObjCMethodDecl * tryCaptureObjCSelf(SourceLocation Loc)
Try to capture an implicit reference to 'self'.
Definition: SemaExprObjC.cpp:1413
clang::Sema::ExpressionEvaluationContextRecord::SavedMaybeODRUseExprs
MaybeODRUseExprSet SavedMaybeODRUseExprs
Definition: Sema.h:1295
clang::Sema::hasReachableMemberSpecialization
bool hasReachableMemberSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a reachable declaration of D that is a member specialization declaration (as op...
Definition: SemaLookup.cpp:1759
clang::Sema::StdInitializerList
ClassTemplateDecl * StdInitializerList
The C++ "std::initializer_list" template, which is defined in <initializer_list>.
Definition: Sema.h:1152
clang::Sema::ActOnObjCReenterContainerContext
void ActOnObjCReenterContainerContext(ObjCContainerDecl *ObjCCtx)
Definition: SemaDecl.cpp:17707
clang::Sema::LookupName
bool LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation=false, bool ForceNoCPlusPlus=false)
Perform unqualified name lookup starting from a given scope.
Definition: SemaLookup.cpp:2179
clang::PreferredTypeBuilder::enterUnary
void enterUnary(Sema &S, SourceLocation Tok, tok::TokenKind OpKind, SourceLocation OpLoc)
Definition: SemaCodeComplete.cpp:577
clang::Sema::MarkThisReferenced
void MarkThisReferenced(CXXThisExpr *This)
Definition: SemaExprCXX.cpp:1406
clang::Sema::FST_Kprintf
@ FST_Kprintf
Definition: Sema.h:13571
clang::Sema::AssumedTemplateKind
AssumedTemplateKind
Definition: Sema.h:8008
clang::Sema::RequireNonAbstractType
bool RequireNonAbstractType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Definition: SemaDeclCXX.cpp:5827
clang::Sema::VariadicCallType
VariadicCallType
Definition: Sema.h:12271
clang::Sema::DefaultedFunctionKind::DefaultedFunctionKind
DefaultedFunctionKind()
Definition: Sema.h:3398
clang::Sema::CodeSynthesisContext::TemplateInstantiation
@ TemplateInstantiation
We are instantiating a template declaration.
Definition: Sema.h:9195
clang::Sema::IsSimplyAccessible
bool IsSimplyAccessible(NamedDecl *Decl, CXXRecordDecl *NamingClass, QualType BaseType)
Checks access to Target from the given class.
Definition: SemaAccess.cpp:1931
clang::Sema::AbstractIvarType
@ AbstractIvarType
Definition: Sema.h:7941
clang::Sema::ActOnCXXFoldExpr
ExprResult ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
Handle a C++1z fold-expression: ( expr op ... op expr ).
Definition: SemaTemplateVariadic.cpp:1194
clang::Sema::CheckObjCForCollectionOperand
ExprResult CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection)
Definition: SemaStmt.cpp:2207
clang::Sema::CheckComparisonCategoryType
QualType CheckComparisonCategoryType(ComparisonCategoryType Kind, SourceLocation Loc, ComparisonCategoryUsage Usage)
Lookup the specified comparison category types in the standard library, an check the VarDecls possibl...
Definition: SemaDeclCXX.cpp:11437
clang::Sema::PendingLocalImplicitInstantiations
std::deque< PendingImplicitInstantiation > PendingLocalImplicitInstantiations
The queue of implicit template instantiations that are required and must be performed within the curr...
Definition: Sema.h:9882
clang::Sema::VisContext
void * VisContext
VisContext - Manages the stack for #pragma GCC visibility.
Definition: Sema.h:739
clang::DeclAccessPair
A POD class for pairing a NamedDecl* with an access specifier.
Definition: DeclAccessPair.h:29
clang::VectorType
Represents a GCC generic vector type.
Definition: Type.h:3365
clang::Sema::LateInstantiatedAttribute::TmplAttr
const Attr * TmplAttr
Definition: Sema.h:10058
clang::Sema::getNullabilityKeyword
IdentifierInfo * getNullabilityKeyword(NullabilityKind nullability)
Retrieve the keyword associated.
Definition: SemaType.cpp:4104
clang::Sema::SemaDiagnosticBuilder::K_Immediate
@ K_Immediate
Emit the diagnostic immediately (i.e., behave like Sema::Diag()).
Definition: Sema.h:1776
clang::Sema::CTAK_Deduced
@ CTAK_Deduced
The template argument was deduced via template argument deduction.
Definition: Sema.h:8326
clang::Sema::ActOnField
Decl * ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object...
Definition: SemaDecl.cpp:17819
clang::Sema::VariadicConstructor
@ VariadicConstructor
Definition: Sema.h:12275
clang::Sema::ActOnStartCategoryImplementation
ObjCCategoryImplDecl * ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &AttrList)
ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration...
Definition: SemaDeclObjC.cpp:1916
clang::Sema::PushDeclContext
void PushDeclContext(Scope *S, DeclContext *DC)
Set the current declaration context until it gets popped.
Definition: SemaDecl.cpp:1344
clang::Sema::DefaultFunctionArrayConversion
ExprResult DefaultFunctionArrayConversion(Expr *E, bool Diagnose=true)
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
Definition: SemaExpr.cpp:506
clang::Sema::PCSK_BSS
@ PCSK_BSS
Definition: Sema.h:452
clang::Sema::CodeSynthesisContext::RequirementInstantiation
@ RequirementInstantiation
We are instantiating a requirement of a requires expression.
Definition: Sema.h:9238
clang::FPOptionsOverride
Represents difference between two FPOptions values.
Definition: LangOptions.h:806
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4562
clang::Sema::ActOnOpenMPTargetTeamsDirective
StmtResult ActOnOpenMPTargetTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target teams' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:14389
clang::Sema::InstantiatingTemplate::ConstraintSubstitution
Definition: Sema.h:9564
clang::Sema::LateTemplateParser
LateTemplateParserCB * LateTemplateParser
Definition: Sema.h:925
clang::index::SymbolKind::Module
@ Module
clang::Sema::AccessCheckingSFINAE
bool AccessCheckingSFINAE
When true, access checking violations are treated as SFINAE failures rather than hard errors.
Definition: Sema.h:7933
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:182
clang::LangOptions::FPExceptionModeKind
FPExceptionModeKind
Possible floating point exception behavior.
Definition: LangOptions.h:270
clang::Sema::getInheritingConstructorName
ParsedType getInheritingConstructorName(CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
Handle the result of the special case name lookup for inheriting constructor declarations.
Definition: SemaExprCXX.cpp:55
clang::Sema::SelectorSet
llvm::SmallPtrSet< Selector, 8 > SelectorSet
Definition: Sema.h:4751
clang::Sema::resolveAddressOfSingleOverloadCandidate
FunctionDecl * resolveAddressOfSingleOverloadCandidate(Expr *E, DeclAccessPair &FoundResult)
Given an expression that refers to an overloaded function, try to resolve that function to a single f...
Definition: SemaOverload.cpp:12646
clang::MultiTemplateParamsArg
MutableArrayRef< TemplateParameterList * > MultiTemplateParamsArg
Definition: Ownership.h:276
clang::Sema::ActOnSkippedFunctionBody
Decl * ActOnSkippedFunctionBody(Decl *Decl)
Definition: SemaDecl.cpp:15361
clang::Sema::AbstractArrayType
@ AbstractArrayType
Definition: Sema.h:7943
clang::Sema::FinalizeDeclaration
void FinalizeDeclaration(Decl *D)
FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions neces...
Definition: SemaDecl.cpp:14253
clang::ExprResult
ActionResult< Expr * > ExprResult
Definition: Ownership.h:262
clang::Sema::getNumArgumentsInExpansion
std::optional< unsigned > getNumArgumentsInExpansion(QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
Determine the number of arguments in the given pack expansion type.
Definition: SemaTemplateVariadic.cpp:810
clang::Sema::canFullyTypeCheckRedeclaration
bool canFullyTypeCheckRedeclaration(ValueDecl *NewD, ValueDecl *OldD, QualType NewT, QualType OldT)
Determines if we can perform a correct type check for D as a redeclaration of PrevDecl.
Definition: SemaDecl.cpp:10789
clang::Sema::RefersToMemberWithReducedAlignment
void RefersToMemberWithReducedAlignment(Expr *E, llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)> Action)
This function calls Action when it determines that E designates a misaligned member due to the packed...
Definition: SemaChecking.cpp:17686
clang::Sema::CheckConstexprKind::Diagnose
@ Diagnose
Diagnose issues that are non-constant or that are extensions.
clang::Sema::hasVisibleDefinition
bool hasVisibleDefinition(const NamedDecl *D)
Definition: Sema.h:2409
clang::Sema::ModuleDeclKind::PartitionInterface
@ PartitionInterface
'export module X:Y;'
clang::Sema::InstantiateAttrs
void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
Definition: SemaTemplateInstantiateDecl.cpp:696
clang::Sema::CFP_SameSide
@ CFP_SameSide
Definition: Sema.h:13089
clang::CPlusPlus
@ CPlusPlus
Definition: LangStandard.h:53
clang::Sema::CheckForConstantInitializer
bool CheckForConstantInitializer(Expr *e, QualType t)
type checking declaration initializers (C99 6.7.8)
Definition: SemaDecl.cpp:12191
clang::Sema::addMethodToGlobalList
void addMethodToGlobalList(ObjCMethodList *List, ObjCMethodDecl *Method)
Add the given method to the list of globally-known methods.
Definition: SemaDeclObjC.cpp:3317
clang::ArrayType
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: Type.h:3019
clang::Sema::warnOnReservedIdentifier
void warnOnReservedIdentifier(const NamedDecl *D)
Definition: SemaDecl.cpp:6059
clang::Sema::CheckConstructorAccess
AccessResult CheckConstructorAccess(SourceLocation Loc, CXXConstructorDecl *D, DeclAccessPair FoundDecl, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp=false)
Checks access to a constructor.
Definition: SemaAccess.cpp:1631
clang::Sema::getCurFunctionOrMethodDecl
NamedDecl * getCurFunctionOrMethodDecl()
getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in,...
Definition: Sema.cpp:1469
clang::interp::Inc
bool Inc(InterpState &S, CodePtr OpPC)
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by ...
Definition: Interp.h:481
clang::Sema::GlobalMethodPool::end
iterator end()
Definition: Sema.h:1515
clang::Sema::ActOnExprStmt
StmtResult ActOnExprStmt(ExprResult Arg, bool DiscardedValue=true)
Definition: SemaStmt.cpp:46
clang::Sema::ActOnBaseSpecifiers
void ActOnBaseSpecifiers(Decl *ClassDecl, MutableArrayRef< CXXBaseSpecifier * > Bases)
ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are...
Definition: SemaDeclCXX.cpp:2869
clang::Sema::BuildQualifiedType
QualType BuildQualifiedType(QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr)
Definition: SemaType.cpp:1930
clang::Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl
ExprResult ActOnOpenMPDeclareMapperDirectiveVarDecl(Scope *S, QualType MapperType, SourceLocation StartLoc, DeclarationName VN)
Build the mapper variable of '#pragma omp declare mapper'.
Definition: SemaOpenMP.cpp:22446
clang::Sema::GlobalNewDeleteDeclared
bool GlobalNewDeleteDeclared
A flag to remember whether the implicit forms of operator new and delete have been declared.
Definition: Sema.h:1222
clang::Sema::getLambdaConversionFunctionResultType
QualType getLambdaConversionFunctionResultType(const FunctionProtoType *CallOpType, CallingConv CC)
Get the return type to use for a lambda's conversion function(s) to function pointer type,...
Definition: SemaLambda.cpp:1374
clang::Sema::TryCapture_Implicit
@ TryCapture_Implicit
Definition: Sema.h:5438
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo(bool IsXL)
Definition: Sema.h:510
clang::Sema::GlobalEagerInstantiationScope::GlobalEagerInstantiationScope
GlobalEagerInstantiationScope(Sema &S, bool Enabled)
Definition: Sema.h:9831
clang::Sema::CheckImplementationIvars
void CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
CheckImplementationIvars - This routine checks if the instance variables listed in the implelementati...
Definition: SemaDeclObjC.cpp:2134
clang::FileNullabilityMap::File
FileID File
Definition: Sema.h:273
clang::Sema::LK_Dictionary
@ LK_Dictionary
Definition: Sema.h:3954
clang::Sema::AlignPackInfo::Native
@ Native
Definition: Sema.h:497
clang::Sema::TemplateNameKindForDiagnostics::ClassTemplate
@ ClassTemplate
clang::Sema::NSValuePointer
QualType NSValuePointer
Pointer to NSValue type (NSValue *).
Definition: Sema.h:1185
clang::Sema::DeduceVariableDeclarationType
bool DeduceVariableDeclarationType(VarDecl *VDecl, bool DirectInit, Expr *Init)
Definition: SemaDecl.cpp:12694
clang::Sema::OCK_None
@ OCK_None
Definition: Sema.h:10173
clang::Sema::PCC_RecoveryInFunction
@ PCC_RecoveryInFunction
Code completion occurs within the body of a function on a recovery path, where we do not have a speci...
Definition: Sema.h:13237
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo()
Definition: Sema.h:512
clang::Sema::CFP_Native
@ CFP_Native
Definition: Sema.h:13091
clang::Sema::PragmaStackSentinelRAII::PragmaStackSentinelRAII
PragmaStackSentinelRAII(Sema &S, StringRef SlotLabel, bool ShouldAct)
Definition: SemaAttr.cpp:28
clang::Sema::hasAnyAcceptableTemplateNames
bool hasAnyAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true, bool AllowNonTemplateFunctions=false)
Definition: SemaTemplate.cpp:158
clang::Sema::BuildSynthesizedThreeWayComparison
ExprResult BuildSynthesizedThreeWayComparison(SourceLocation OpLoc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, FunctionDecl *DefaultedFn)
Definition: SemaOverload.cpp:14240
clang::Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope
void ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, SmallVectorImpl< FunctionDecl * > &Bases)
The declarator D defines a function in the scope S which is nested in an omp begin/end declare varian...
Definition: SemaOpenMP.cpp:7137
clang::Sema::CheckParameterPacksForExpansion
bool CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::optional< unsigned > &NumExpansions)
Determine whether we could expand a pack expansion with the given set of parameter packs into separat...
Definition: SemaTemplateVariadic.cpp:688
clang::Sema::ImmediateDiagBuilder::operator<<
const ImmediateDiagBuilder & operator<<(T &&V) const
Definition: Sema.h:1749
clang::Sema::TemplateTy
OpaquePtr< TemplateName > TemplateTy
Definition: Sema.h:401
clang::Sema::ExpressionEvaluationContextRecord::NumTypos
unsigned NumTypos
The number of typos encountered during this expression evaluation context (i.e.
Definition: Sema.h:1293
clang::Sema::VAK_Valid
@ VAK_Valid
Definition: Sema.h:12286
clang::Sema::ActOnMethodDeclaration
Decl * ActOnMethodDeclaration(Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, const ParsedAttributesView &AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition)
Definition: SemaDeclObjC.cpp:4721
clang::Sema::IER_DoesNotExist
@ IER_DoesNotExist
The symbol does not exist.
Definition: Sema.h:6009
clang::DecompositionDecl
A decomposition declaration.
Definition: DeclCXX.h:4077
clang::LangOptions::FPEvalMethodKind
FPEvalMethodKind
Possible float expression evaluation method choices.
Definition: LangOptions.h:282
clang::Sema::NamedReturnInfo::Status
Status
Definition: Sema.h:5170
clang::Sema::FullExprArg
Definition: Sema.h:4979
clang::Sema::ActOnOpenMPReverseOffloadClause
OMPClause * ActOnOpenMPReverseOffloadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'reverse_offload' clause.
Definition: SemaOpenMP.cpp:17496
clang::Sema::PointerToInt
@ PointerToInt
PointerToInt - The assignment converts a pointer to an int, which we accept as an extension.
Definition: Sema.h:12363
Depth
int Depth
Definition: ASTDiff.cpp:190
clang::WeakInfo
Captures information about a #pragma weak directive.
Definition: Weak.h:25
clang::Sema::LiteralOperatorLookupResult
LiteralOperatorLookupResult
The possible outcomes of name lookup for a literal operator.
Definition: Sema.h:4363
clang::Sema::ExpressionEvaluationContextRecord::ExprContext
enum clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext
clang::Sema::StrictGuardStackCheckStack
PragmaStack< bool > StrictGuardStackCheckStack
Definition: Sema.h:701
clang::Sema::CXXCopyConstructor
@ CXXCopyConstructor
Definition: Sema.h:1547
clang::concepts::NestedRequirement
A requires-expression requirement which is satisfied when a general constraint expression is satisfie...
Definition: ExprConcepts.h:404
clang::Sema::ActOnNonTypeTemplateParameter
NamedDecl * ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
Definition: SemaTemplate.cpp:1473
clang::Sema::ArgumentPackSubstitutionIndexRAII::~ArgumentPackSubstitutionIndexRAII
~ArgumentPackSubstitutionIndexRAII()
Definition: Sema.h:9440
clang::PseudoDestructorTypeStorage
Stores the type being destroyed by a pseudo-destructor expression.
Definition: ExprCXX.h:2541
clang::Sema::isValidSectionSpecifier
llvm::Error isValidSectionSpecifier(StringRef Str)
Used to implement to perform semantic checking on attribute((section("foo"))) specifiers.
Definition: SemaDeclAttr.cpp:3299
clang::VisibleModuleSet
A set of visible modules.
Definition: Module.h:745
clang::Sema::SFINAETrap::hasErrorOccurred
bool hasErrorOccurred() const
Determine whether any SFINAE errors have been trapped.
Definition: Sema.h:9763
clang::Sema::NameClassification::Type
ParsedType Type
Definition: Sema.h:2672
clang::Sema::GlobalMethodPool::begin
iterator begin()
Definition: Sema.h:1514
clang::Sema::BuildInstanceMessageImplicit
ExprResult BuildInstanceMessageImplicit(Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2777
TypeTraits.h
clang::FunctionProtoType::ExceptionSpecInfo::Exceptions
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
Definition: Type.h:4085
clang::Sema::ActOnPragmaPack
void ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *Alignment)
ActOnPragmaPack - Called on well formed #pragma pack(...).
Definition: SemaAttr.cpp:324
clang::Sema::FindHiddenVirtualMethods
void FindHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
Check if a method overloads virtual methods in a base class without overriding any.
Definition: SemaDeclCXX.cpp:10072
clang::Sema::ExpressionEvaluationContextRecord::PossibleDerefs
llvm::SmallPtrSet< const Expr *, 8 > PossibleDerefs
Definition: Sema.h:1314
clang::OpenMPOrderClauseKind
OpenMPOrderClauseKind
OpenMP attributes for 'order' clause.
Definition: OpenMPKinds.h:164
clang::Sema::CodeCompleteAttribute
void CodeCompleteAttribute(AttributeCommonInfo::Syntax Syntax, AttributeCompletion Completion=AttributeCompletion::Attribute, const IdentifierInfo *Scope=nullptr)
Definition: SemaCodeComplete.cpp:4509
clang::Sema::AddAnnotationAttr
void AddAnnotationAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Annot, MutableArrayRef< Expr * > Args)
AddAnnotationAttr - Adds an annotation Annot with Args arguments to D.
Definition: SemaDeclAttr.cpp:4262
clang::Sema::DelayedDiagnostics::popUndelayed
void popUndelayed(DelayedDiagnosticsState state)
Undo a previous pushUndelayed().
Definition: Sema.h:993
clang::Sema::NameClassification::getExpression
ExprResult getExpression() const
Definition: Sema.h:2742
clang::Sema::CodeCompleteObjCImplementationDecl
void CodeCompleteObjCImplementationDecl(Scope *S)
Definition: SemaCodeComplete.cpp:8491
clang::Sema::VariadicBlock
@ VariadicBlock
Definition: Sema.h:12273
clang::ASTConsumer
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
Definition: ASTConsumer.h:33
clang::Sema::FindFirstQualifierInScope
NamedDecl * FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS)
If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup ...
Definition: SemaCXXScopeSpec.cpp:372
clang::Sema::isUnavailableAlignedAllocationFunction
bool isUnavailableAlignedAllocationFunction(const FunctionDecl &FD) const
Determine whether FD is an aligned allocation or deallocation function that is unavailable.
Definition: SemaExprCXX.cpp:1937
clang::Sema::Initialize
void Initialize()
Perform initialization that occurs after the parser has been initialized but before it parses anythin...
Definition: Sema.cpp:267
clang::Sema::ActOnTypeRequirement
concepts::Requirement * ActOnTypeRequirement(SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId)
Definition: SemaExprCXX.cpp:8936
clang::Sema::ExpressionEvaluationContext::Unevaluated
@ Unevaluated
The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7),...
clang::Sema::MaximumAlignment
static const uint64_t MaximumAlignment
Definition: Sema.h:398
clang::Sema::SubstTemplateArguments
bool SubstTemplateArguments(ArrayRef< TemplateArgumentLoc > Args, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentListInfo &Outputs)
Definition: SemaTemplateInstantiate.cpp:3910
clang::Sema::ConstraintEvalRAII::TI
InstTy & TI
Definition: Sema.h:9978
clang::Sema::PerformQualificationConversion
ExprResult PerformQualificationConversion(Expr *E, QualType Ty, ExprValueKind VK=VK_PRValue, CheckedConversionKind CCK=CCK_ImplicitConversion)
Definition: SemaInit.cpp:8273
clang::Sema::AlignPackInfo
Definition: Sema.h:493
clang::Sema::FormatStringType
FormatStringType
Definition: Sema.h:13565
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:60
clang::Sema::checkSpecializationReachability
void checkSpecializationReachability(SourceLocation Loc, NamedDecl *Spec)
Definition: SemaTemplate.cpp:11502
clang::CreateRISCVIntrinsicManager
std::unique_ptr< sema::RISCVIntrinsicManager > CreateRISCVIntrinsicManager(Sema &S)
Definition: SemaRISCVVectorLookup.cpp:425
clang::Sema::ActOnOpenMPCancellationPointDirective
StmtResult ActOnOpenMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancellation point'.
Definition: SemaOpenMP.cpp:13304
clang::Sema::FunctionEmissionStatus::CUDADiscarded
@ CUDADiscarded
clang::Sema::ActOnOpenMPTargetParallelForSimdDirective
StmtResult ActOnOpenMPTargetParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for simd' after parsing of the associated statemen...
Definition: SemaOpenMP.cpp:14061
clang::Sema::InnermostDeclarationWithDelayedImmediateInvocations
std::optional< ExpressionEvaluationContextRecord::InitializationContext > InnermostDeclarationWithDelayedImmediateInvocations() const
Definition: Sema.h:9698
clang::ASTMutationListener
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
Definition: ASTMutationListener.h:46
clang::Sema::CodeCompleteExpression
void CodeCompleteExpression(Scope *S, const CodeCompleteExpressionData &Data)
Perform code-completion in an expression context when we know what type we're looking for.
Definition: SemaCodeComplete.cpp:4758
clang::Sema::DiagnoseUnexpandedParameterPack
bool DiagnoseUnexpandedParameterPack(SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
If the given type contains an unexpanded parameter pack, diagnose the error.
Definition: SemaTemplateVariadic.cpp:399
clang::Sema::BuildWritePipeType
QualType BuildWritePipeType(QualType T, SourceLocation Loc)
Build a Write-only Pipe type.
Definition: SemaType.cpp:2302
clang::Sema::BuildCXXNew
ExprResult BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional< Expr * > ArraySize, SourceRange DirectInitRange, Expr *Initializer)
Definition: SemaExprCXX.cpp:1968
OpenMPKinds.h
clang::concepts::Requirement
A static requirement that can be used in a requires-expression to check properties of types and expre...
Definition: ExprConcepts.h:146
clang::EST_DynamicNone
@ EST_DynamicNone
throw()
Definition: ExceptionSpecificationType.h:22
clang::Sema::CCEK_Noexcept
@ CCEK_Noexcept
Condition in a noexcept(bool) specifier.
Definition: Sema.h:3857
clang::Sema::PSK_CodeSeg
@ PSK_CodeSeg
Definition: Sema.h:10635
clang::Sema::NestedNameSpecInfo::ObjectType
ParsedType ObjectType
The type of the object, if we're parsing nested-name-specifier in a member access expression.
Definition: Sema.h:6927
clang::Sema::ShouldSplatAltivecScalarInCast
bool ShouldSplatAltivecScalarInCast(const VectorType *VecTy)
Definition: SemaCast.cpp:2645
clang::Sema::CheckHLSLEntryPoint
void CheckHLSLEntryPoint(FunctionDecl *FD)
Definition: SemaDecl.cpp:12163
clang::Sema::ExpressionEvaluationContextRecord::DelayedDecltypeBinds
SmallVector< CXXBindTemporaryExpr *, 8 > DelayedDecltypeBinds
If we are processing a decltype type, a set of temporary binding expressions for which we have deferr...
Definition: Sema.h:1312
clang::Sema::DiagReceiverTy
llvm::function_ref< void(SourceLocation Loc, PartialDiagnostic PD)> DiagReceiverTy
Definition: Sema.h:5284
clang::Sema::MSStructPragmaOn
bool MSStructPragmaOn
Definition: Sema.h:431
clang::Sema::TemplateNameKindForDiagnostics::VarTemplate
@ VarTemplate
clang::Sema::ActOnStartOfObjCMethodDef
void ActOnStartOfObjCMethodDef(Scope *S, Decl *D)
ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared,...
Definition: SemaDeclObjC.cpp:362
clang::Sema::AssignConvertType
AssignConvertType
AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the ...
Definition: Sema.h:12357
clang::MultiLevelTemplateArgumentList
Data structure that captures multiple levels of template argument lists for use in template instantia...
Definition: Template.h:76
clang::Sema::BuildObjCExceptionDecl
VarDecl * BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
Build a type-check a new Objective-C exception variable declaration.
Definition: SemaDeclObjC.cpp:5140
clang::Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution
@ DeducedTemplateArgumentSubstitution
We are substituting template argument determined as part of template argument deduction for either a ...
Definition: Sema.h:9218
clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl
Decl * ObjCImpDecl
Definition: Sema.h:5774
clang::Sema::ContextualImplicitConverter::SuppressConversion
bool SuppressConversion
Definition: Sema.h:3870
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2496
clang::Sema::DefaultedComparisonKind::None
@ None
This is not a defaultable comparison operator.
clang::FPOptions
Definition: LangOptions.h:657
clang::Sema::PragmaClangSection::SectionName
std::string SectionName
Definition: Sema.h:465
clang::Sema::ActOnOpenMPAtClause
OMPClause * ActOnOpenMPAtClause(OpenMPAtClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'at' clause.
Definition: SemaOpenMP.cpp:16845
clang::Sema::AddInitializerToDecl
void AddInitializerToDecl(Decl *dcl, Expr *init, bool DirectInit)
AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
Definition: SemaDecl.cpp:13004
clang::Sema::PerformContextuallyConvertToBool
ExprResult PerformContextuallyConvertToBool(Expr *From)
PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C+...
Definition: SemaOverload.cpp:5696
clang::Sema::BuiltinChangeCVRQualifiers
QualType BuiltinChangeCVRQualifiers(QualType BaseType, UTTKind UKind, SourceLocation Loc)
Definition: SemaType.cpp:9414
clang::Sema::CheckSpecifiedExceptionType
bool CheckSpecifiedExceptionType(QualType &T, SourceRange Range)
CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification.
Definition: SemaExceptionSpec.cpp:121
clang::Sema::Ovl_Match
@ Ovl_Match
This is not an overload because the signature exactly matches an existing declaration.
Definition: Sema.h:3726
clang::Sema::CheckTemplateArgument
bool CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &SugaredConverted, SmallVectorImpl< TemplateArgument > &CanonicalConverted, CheckTemplateArgumentKind CTAK)
Check that the given template argument corresponds to the given template parameter.
Definition: SemaTemplate.cpp:5537
ObjCMethodList.h
clang::Sema::Diags
DiagnosticsEngine & Diags
Definition: Sema.h:411
clang::Sema::BuildSourceLocExpr
ExprResult BuildSourceLocExpr(SourceLocExpr::IdentKind Kind, QualType ResultTy, SourceLocation BuiltinLoc, SourceLocation RPLoc, DeclContext *ParentContext)
Definition: SemaExpr.cpp:17050
clang::ExternalSemaSource
An abstract interface that should be implemented by external AST sources that also provide informatio...
Definition: ExternalSemaSource.h:50
clang::Sema::ClassifyName
NameClassification ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, CorrectionCandidateCallback *CCC=nullptr)
Perform name lookup on the given name, classifying it based on the results of name lookup and the fol...
Definition: SemaDecl.cpp:899
clang::Sema::diagIfOpenMPHostCode
SemaDiagnosticBuilder diagIfOpenMPHostCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
Definition: SemaOpenMP.cpp:2066
clang::Sema::LateTemplateParserCB
void LateTemplateParserCB(void *P, LateParsedTemplate &LPT)
Callback to the parser to parse templated functions when needed.
Definition: Sema.h:923
clang::Sema::CanPerformCopyInitialization
bool CanPerformCopyInitialization(const InitializedEntity &Entity, ExprResult Init)
Definition: SemaInit.cpp:10231
clang::Sema::DiagRuntimeBehavior
bool DiagRuntimeBehavior(SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the current evaluation context.
Definition: SemaExpr.cpp:20225
clang::Sema::TypoRecoveryCallback
std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> TypoRecoveryCallback
Definition: Sema.h:4394
clang::LambdaCaptureDefault
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
Definition: Lambda.h:22
clang::Sema::PushBlockScope
void PushBlockScope(Scope *BlockScope, BlockDecl *Block)
Definition: Sema.cpp:2129
clang::LabelDecl
Represents the declaration of a label.
Definition: Decl.h:496
clang::Sema::CheckTemplateTypeArgument
bool CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &SugaredConverted, SmallVectorImpl< TemplateArgument > &CanonicalConverted)
Definition: SemaTemplate.cpp:5144
clang::Sema::getDecltypeForExpr
QualType getDecltypeForExpr(Expr *E)
getDecltypeForExpr - Given an expr, will return the decltype for that expression, according to the ru...
Definition: SemaType.cpp:9231
clang::Sema::ConditionError
static ConditionResult ConditionError()
Definition: Sema.h:12823
clang::Sema::CheckCompleteDestructorVariant
void CheckCompleteDestructorVariant(SourceLocation CurrentLocation, CXXDestructorDecl *Dtor)
Do semantic checks to allow the complete destructor variant to be emitted when the destructor is defi...
Definition: SemaDeclCXX.cpp:13912
clang::PseudoObjectExpr
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:5945
clang::Sema::TPC_ClassTemplateMember
@ TPC_ClassTemplateMember
Definition: Sema.h:8137
clang::Decl::getCanonicalDecl
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
Definition: DeclBase.h:943
clang::Sema::ActOnBlockStart
void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope)
ActOnBlockStart - This callback is invoked when a block literal is started.
Definition: SemaExpr.cpp:16430
clang::Sema::BuildMemberPointerType
QualType BuildMemberPointerType(QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
Build a member pointer type T Class::*.
Definition: SemaType.cpp:3027
clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective
StmtResult ActOnOpenMPTargetTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute simd' after parsing of the associated stat...
Definition: SemaOpenMP.cpp:14577
clang::Sema::AMK_None
@ AMK_None
Don't merge availability attributes at all.
Definition: Sema.h:3594
clang::Sema::VerifyICEDiagnoser::diagnoseNotICEType
virtual SemaDiagnosticBuilder diagnoseNotICEType(Sema &S, SourceLocation Loc, QualType T)
Definition: SemaExpr.cpp:17456
clang::Sema::ActOnStartCategoryInterface
ObjCCategoryDecl * ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclObjC.cpp:1818
clang::Sema::BuildCXXTypeId
ExprResult BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a C++ typeid expression with a type operand.
Definition: SemaExprCXX.cpp:539
clang::ComparisonCategoryType
ComparisonCategoryType
An enumeration representing the different comparison categories types.
Definition: ComparisonCategories.h:45
clang::Sema::ACK_Arithmetic
@ ACK_Arithmetic
An arithmetic operation.
Definition: Sema.h:12333
clang::Sema::LookupObjCProtocolName
@ LookupObjCProtocolName
Look up the name of an Objective-C protocol.
Definition: Sema.h:4325
clang::Sema::ActOnOpenMPDispatchDirective
StmtResult ActOnOpenMPDispatchDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp dispatch' after parsing of the.
Definition: SemaOpenMP.cpp:10465
clang::Sema::ModuleImportState::GlobalFragment
@ GlobalFragment
after 'module;' but before 'module X;'
clang::Sema::ActOnPragmaFPContract
void ActOnPragmaFPContract(SourceLocation Loc, LangOptions::FPModeKind FPC)
ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp ...
Definition: SemaAttr.cpp:1288
clang::Sema::ModuleDeclKind::Implementation
@ Implementation
'module X;'
CastType
CastType
Definition: SemaCast.cpp:46
clang::Sema::areLaxCompatibleVectorTypes
bool areLaxCompatibleVectorTypes(QualType srcType, QualType destType)
Are the two types lax-compatible vector types? That is, given that one of them is a vector,...
Definition: SemaExpr.cpp:8014
clang::Sema::CheckExplicitlyDefaultedSpecialMember
bool CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, SourceLocation DefaultLoc)
Definition: SemaDeclCXX.cpp:7465
clang::Sema::checkVariadicArgument
void checkVariadicArgument(const Expr *E, VariadicCallType CT)
Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic...
Definition: SemaExpr.cpp:972
clang::Sema::ExpressionEvaluationContextRecord::InitializationContext::Context
DeclContext * Context
Definition: Sema.h:1354
clang::Sema::ActOnStartClassInterface
ObjCInterfaceDecl * ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody)
Definition: SemaDeclObjC.cpp:974
clang::Sema::DiagnoseNontrivial
void DiagnoseNontrivial(const CXXRecordDecl *Record, CXXSpecialMember CSM)
Diagnose why the specified class does not have a trivial special member of the given kind.
Definition: SemaDeclCXX.cpp:9830
clang::Sema::CreateBuiltinUnaryOp
ExprResult CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp=false)
Definition: SemaExpr.cpp:15785
clang::VisibleDeclConsumer
Consumes visible declarations found when searching for all visible names within a given scope or cont...
Definition: Lookup.h:790
clang::Sema::ActOnOpenMPReadClause
OMPClause * ActOnOpenMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'read' clause.
Definition: SemaOpenMP.cpp:17421
clang::Sema::MMS_loose
@ MMS_loose
Definition: Sema.h:4849
clang::MSGuidDecl
A global _GUID constant.
Definition: DeclCXX.h:4200
clang::Sema::PDiag
PartialDiagnostic PDiag(unsigned DiagID=0)
Build a partial diagnostic.
Definition: SemaInternal.h:24
clang::Sema::NTCUK_Destruct
@ NTCUK_Destruct
Definition: Sema.h:3021
clang::Sema::ContextualImplicitConverter
Abstract base class used to perform a contextual implicit conversion from an expression to any type p...
Definition: Sema.h:3867
clang::Sema::IncompatibleFunctionPointer
@ IncompatibleFunctionPointer
IncompatibleFunctionPointer - The assignment is between two function pointers types that are not comp...
Definition: Sema.h:12380
clang::Sema::BFRK_Check
@ BFRK_Check
Determining whether a for-range statement could be built.
Definition: Sema.h:5124
clang::Sema::hasVisibleDefaultArgument
bool hasVisibleDefaultArgument(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if the template parameter D has a visible default argument.
Definition: SemaLookup.cpp:1658
clang::Sema::OpenMPVarListDataTy::IsMapTypeImplicit
bool IsMapTypeImplicit
Definition: Sema.h:11991
clang::Sema::ActOnCoroutineBodyStart
bool ActOnCoroutineBodyStart(Scope *S, SourceLocation KwLoc, StringRef Keyword)
Definition: SemaCoroutine.cpp:690
clang::TNK_Var_template
@ TNK_Var_template
The name refers to a variable template whose specialization produces a variable.
Definition: TemplateKinds.h:33
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2715
clang::Sema::CheckConditionalOperands
QualType CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
Note that LHS is not null here, even if this is the gnu "x ?: y" extension.
Definition: SemaExpr.cpp:8838
clang::Sema::BuildForRangeKind
BuildForRangeKind
Definition: Sema.h:5116
clang::Sema::GetTypeFromParser
static QualType GetTypeFromParser(ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
Definition: SemaType.cpp:3107
clang::Sema::InstantiatingTemplate::isInvalid
bool isInvalid() const
Determines whether we have exceeded the maximum recursive template instantiations.
Definition: Sema.h:9611
clang::Sema::SetFunctionBodyKind
void SetFunctionBodyKind(Decl *D, SourceLocation Loc, FnBodyKind BodyKind)
Definition: SemaDeclCXX.cpp:17632
clang::Sema::AssumedTemplateKind::None
@ None
This is not assumed to be a template name.
clang::Sema::getCurLambda
sema::LambdaScopeInfo * getCurLambda(bool IgnoreNonLambdaCapturingScope=false)
Retrieve the current lambda scope info, if any.
Definition: Sema.cpp:2346
clang::Sema::TypeTagData::TypeTagData
TypeTagData(QualType Type, bool LayoutCompatible, bool MustBeNull)
Definition: Sema.h:13666
clang::Sema::ProcessDeclAttributeOptions::WithIgnoreTypeAttributes
ProcessDeclAttributeOptions WithIgnoreTypeAttributes(bool Val)
Definition: Sema.h:4650
clang::Sema::BuildCStyleCastExpr
ExprResult BuildCStyleCastExpr(SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op)
Definition: SemaCast.cpp:3285
clang::AutoType
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:5253
clang::Sema::TypoExprs
llvm::SmallVector< TypoExpr *, 2 > TypoExprs
Holds TypoExprs that are created from createDelayedTypo.
Definition: Sema.h:447
clang::Sema::PSK_Push
@ PSK_Push
Definition: Sema.h:479
clang::Sema::ActOnOpenMPTargetTeamsDistributeDirective
StmtResult ActOnOpenMPTargetTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute' after parsing of the associated statement...
Definition: SemaOpenMP.cpp:14420
clang::Sema::NC_DependentNonType
@ NC_DependentNonType
The name denotes a member of a dependent type that could not be resolved.
Definition: Sema.h:2648
clang::Sema::PragmaPackInfo::Action
PragmaMsStackAction Action
Definition: Sema.h:487
clang::Sema::SubstAutoType
QualType SubstAutoType(QualType TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
Definition: SemaTemplateDeduction.cpp:4871
clang::Sema::PSK_ConstSeg
@ PSK_ConstSeg
Definition: Sema.h:10634
clang::Sema::maybeAddCUDAHostDeviceAttrs
void maybeAddCUDAHostDeviceAttrs(FunctionDecl *FD, const LookupResult &Previous)
May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD, depending on FD and the current co...
Definition: SemaCUDA.cpp:659
clang::Sema::ActOnDependentMemberExpr
ExprResult ActOnDependentMemberExpr(Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaExprMember.cpp:480
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:484
clang::Sema::getPrintable
static const std::string & getPrintable(const std::string &S)
Definition: Sema.h:2184
clang::Sema::addAMDGPUWavesPerEUAttr
void addAMDGPUWavesPerEUAttr(Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a particular declaration.
Definition: SemaDeclAttr.cpp:7802
clang::ParsedAttr
ParsedAttr - Represents a syntactic attribute.
Definition: ParsedAttr.h:233
clang::Sema::ActOnOpenMPIteratorVarDecl
void ActOnOpenMPIteratorVarDecl(VarDecl *VD)
Definition: SemaOpenMP.cpp:22461
clang::Sema::CodeCompleteInitializer
void CodeCompleteInitializer(Scope *S, Decl *D)
Definition: SemaCodeComplete.cpp:6473
clang::Sema::InstantiateClassTemplateSpecializationMembers
void InstantiateClassTemplateSpecializationMembers(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
Instantiate the definitions of all of the members of the given class template specialization,...
Definition: SemaTemplateInstantiate.cpp:3882
clang::OpenMPClauseKind
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
Definition: OpenMPKinds.h:27
clang::Sema::AssignmentAction
AssignmentAction
Definition: Sema.h:3707
clang::Type::isSizelessType
bool isSizelessType() const
As an extension, we classify types as one of "sized" or "sizeless"; every type is one or the other.
Definition: Type.cpp:2345
clang::Sema::IsLastErrorImmediate
bool IsLastErrorImmediate
Is the last error level diagnostic immediate.
Definition: Sema.h:1874
clang::Sema::ActOnOpenMPAtomicDirective
StmtResult ActOnOpenMPAtomicDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12411
clang::Sema::CheckCXXThisCapture
bool CheckCXXThisCapture(SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr, bool ByCopy=false)
Make sure the value of 'this' is actually available in the current context, if it is a potentially ev...
Definition: SemaExprCXX.cpp:1263
clang::Sema::IncompatibleNestedPointerAddressSpaceMismatch
@ IncompatibleNestedPointerAddressSpaceMismatch
IncompatibleNestedPointerAddressSpaceMismatch - The assignment changes address spaces in nested point...
Definition: Sema.h:12407
clang::TemplateSpecCandidateSet
TemplateSpecCandidateSet - A set of generalized overload candidates, used in template specializations...
Definition: TemplateDeduction.h:326
clang::OpenMPGrainsizeClauseModifier
OpenMPGrainsizeClauseModifier
Definition: OpenMPKinds.h:206
clang::Sema::ActOnAliasDeclaration
Decl * ActOnAliasDeclaration(Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec)
Definition: SemaDeclCXX.cpp:13058
clang::Sema::ExpressionEvaluationContextRecord::Context
ExpressionEvaluationContext Context
The expression evaluation context.
Definition: Sema.h:1282
clang::Sema::DiagnoseUnusedButSetDecl
void DiagnoseUnusedButSetDecl(const VarDecl *VD, DiagReceiverTy DiagReceiver)
If VD is set but not otherwise used, diagnose, for a parameter or a variable.
Definition: SemaDecl.cpp:2146
Expr.h
clang::Sema::ShouldDeleteSpecialMember
bool ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI=nullptr, bool Diagnose=false)
Determine if a special member function should have a deleted definition when it is defaulted.
Definition: SemaDeclCXX.cpp:9414
clang::Sema::ActOnOpenMPUnrollDirective
StmtResult ActOnOpenMPUnrollDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp unroll' after parsing of its clauses and the associated statement.
Definition: SemaOpenMP.cpp:14894
clang::Sema::CodeCompleteOrdinaryName
void CodeCompleteOrdinaryName(Scope *S, ParserCompletionContext CompletionContext)
Definition: SemaCodeComplete.cpp:4330
clang::Sema::NameClassification::getNonTypeDecl
NamedDecl * getNonTypeDecl() const
Definition: Sema.h:2752
clang::Sema::CodeSynthesisContext
A context in which code is being synthesized (where a source location alone is not sufficient to iden...
Definition: Sema.h:9190
clang::Sema::Ovl_Overload
@ Ovl_Overload
This is a legitimate overload: the existing declarations are functions or function templates with dif...
Definition: Sema.h:3722
clang::Sema::ActOnContinueStmt
StmtResult ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope)
Definition: SemaStmt.cpp:3326
clang::Sema::ActOnModuleInclude
void ActOnModuleInclude(SourceLocation DirectiveLoc, Module *Mod)
The parser has processed a module import translated from a include or similar preprocessing directive...
Definition: SemaModule.cpp:613
llvm::SmallString
Definition: LLVM.h:34
clang::Sema::TooManyArguments
static bool TooManyArguments(size_t NumParams, size_t NumArgs, bool PartialOverloading=false)
To be used for checking whether the arguments being passed to function exceeds the number of paramete...
Definition: Sema.h:13778
clang::Sema::ActOnObjCAtSynchronizedOperand
ExprResult ActOnObjCAtSynchronizedOperand(SourceLocation atLoc, Expr *operand)
Definition: SemaStmt.cpp:4274
clang::Sema::ActOnOpenMPTeamsDistributeParallelForDirective
StmtResult ActOnOpenMPTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for' after parsing of the associated sta...
Definition: SemaOpenMP.cpp:14340
clang::FriendDecl
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Definition: DeclFriend.h:52
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1624
clang::Sema::ActOnNullStmt
StmtResult ActOnNullStmt(SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
Definition: SemaStmt.cpp:68
clang::Sema::SynthesizedFunctionScope::addContextNote
void addContextNote(SourceLocation UseLoc)
Definition: Sema.h:1074
bool
#define bool
Definition: stdbool.h:20
clang::Sema::CheckConflictingOverridingMethod
void CheckConflictingOverridingMethod(ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
Definition: SemaDeclObjC.cpp:2604
clang::Sema::AssumedTemplateKind::FoundNothing
@ FoundNothing
This is assumed to be a template name because lookup found nothing.
clang::Sema::ActOnVAArg
ExprResult ActOnVAArg(SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc)
Definition: SemaExpr.cpp:16775
clang::OMPVarListLocTy
This structure contains most locations needed for by an OMPVarListClause.
Definition: OpenMPClause.h:259
clang::Sema::ActOnOpenMPUpdateClause
OMPClause * ActOnOpenMPUpdateClause(OpenMPDependClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'update' clause.
Definition: SemaOpenMP.cpp:16928
clang::Sema::ActOnOpenMPDeclareMapperType
QualType ActOnOpenMPDeclareMapperType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare mapper' construct.
Definition: SemaOpenMP.cpp:22341
clang::Sema::getDefaultedFunctionKind
DefaultedFunctionKind getDefaultedFunctionKind(const FunctionDecl *FD)
Determine the kind of defaulting that would be done for a given function.
Definition: SemaDeclCXX.cpp:6561
clang::OverloadCandidateRewriteKind
OverloadCandidateRewriteKind
The kinds of rewrite we perform on overload candidates.
Definition: Overload.h:89
clang::Sema::ProcessDeclAttributeOptions::IncludeCXX11Attributes
bool IncludeCXX11Attributes
Definition: Sema.h:4657
clang::Sema::FRS_DiagnosticIssued
@ FRS_DiagnosticIssued
Definition: Sema.h:4172
clang::Sema::GetNameForDeclarator
DeclarationNameInfo GetNameForDeclarator(Declarator &D)
GetNameForDeclarator - Determine the full declaration name for the given Declarator.
Definition: SemaDecl.cpp:5804
clang::Sema::TDK_DeducedMismatchNested
@ TDK_DeducedMismatchNested
After substituting deduced template arguments, an element of a dependent parameter type did not match...
Definition: Sema.h:8984
clang::Sema::IsFunctionConversion
bool IsFunctionConversion(QualType FromType, QualType ToType, QualType &ResultTy)
Determine whether the conversion from FromType to ToType is a valid conversion that strips "noexcept"...
Definition: SemaOverload.cpp:1628
clang::Sema::ReferenceCompareResult
ReferenceCompareResult
ReferenceCompareResult - Expresses the result of comparing two types (cv1 T1 and cv2 T2) to determine...
Definition: Sema.h:12653
clang::Sema::ReferenceConversionsScope::ObjCLifetime
@ ObjCLifetime
Definition: Sema.h:12676
clang::Sema::BuildCXXForRangeStmt
StmtResult BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind)
BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
Definition: SemaStmt.cpp:2740
clang::Sema::SubstExpr
ExprResult SubstExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3920
clang::Sema::IsAllowedCUDACall
bool IsAllowedCUDACall(const FunctionDecl *Caller, const FunctionDecl *Callee)
Determines whether Caller may invoke Callee, based on their CUDA host/device attributes.
Definition: Sema.h:13109
clang::Sema::PerformContextualImplicitConversion
ExprResult PerformContextualImplicitConversion(SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
Perform a contextual implicit conversion.
Definition: SemaOverload.cpp:6193
clang::CallingConv
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Definition: Specifiers.h:266
clang::Sema::ActOnOpenMPParallelForSimdDirective
StmtResult ActOnOpenMPParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10926
clang::Sema::TypeTagData::TypeTagData
TypeTagData()
Definition: Sema.h:13664
clang::Sema::PragmaClangTextSection
PragmaClangSection PragmaClangTextSection
Definition: Sema.h:474
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:915
clang::Sema::TypeTagData::Type
QualType Type
Definition: Sema.h:13671
clang::Sema::InstantiateDefaultArgument
bool InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
Definition: SemaTemplateInstantiateDecl.cpp:4543
clang::Sema::ActOnOpenMPXDynCGroupMemClause
OMPClause * ActOnOpenMPXDynCGroupMemClause(Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on a well-formed 'ompx_dyn_cgroup_mem' clause.
Definition: SemaOpenMP.cpp:23848
clang::PreferredTypeBuilder::enterCondition
void enterCondition(Sema &S, SourceLocation Tok)
Definition: SemaCodeComplete.cpp:605
clang::Sema::DeduceReturnType
bool DeduceReturnType(FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
Definition: SemaTemplateDeduction.cpp:4925
clang::Sema::ActOnPragmaRedefineExtname
void ActOnPragmaRedefineExtname(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.
Definition: SemaDecl.cpp:19805
clang::Sema::ActOnTypenameType
TypeResult ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc, ImplicitTypenameContext IsImplicitTypename=ImplicitTypenameContext::No)
Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
Definition: SemaTemplate.cpp:10737
clang::LambdaCaptureInitKind
LambdaCaptureInitKind
Definition: DeclSpec.h:2731
clang::Sema::CapturedParamNameType
std::pair< StringRef, QualType > CapturedParamNameType
Definition: Sema.h:5156
clang::Sema::InstantiatingTemplate::~InstantiatingTemplate
~InstantiatingTemplate()
Definition: Sema.h:9607
clang::Sema::GlobalEagerInstantiationScope::perform
void perform()
Definition: Sema.h:9839
clang::Sema::CodeSynthesisContext::NestedRequirementConstraintsCheck
@ NestedRequirementConstraintsCheck
We are checking the satisfaction of a nested requirement of a requires expression.
Definition: Sema.h:9242
clang::Sema::ActOnOpenMPAllocatorClause
OMPClause * ActOnOpenMPAllocatorClause(Expr *Allocator, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocator' clause.
Definition: SemaOpenMP.cpp:16568
clang::Sema::NestedNameSpecInfo::Identifier
IdentifierInfo * Identifier
The identifier preceding the '::'.
Definition: Sema.h:6930
clang::Sema::LookupDestructorName
@ LookupDestructorName
Look up a name following ~ in a destructor name.
Definition: Sema.h:4303
clang::Sema::ImmediateDiagBuilder
Helper class that creates diagnostics with optional template instantiation stacks.
Definition: Sema.h:1699
clang::Sema::mergeHLSLNumThreadsAttr
HLSLNumThreadsAttr * mergeHLSLNumThreadsAttr(Decl *D, const AttributeCommonInfo &AL, int X, int Y, int Z)
Definition: SemaDeclAttr.cpp:6991
clang::Sema::SkipBodyInfo
Definition: Sema.h:2582
AnalysisBasedWarnings.h
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3436
clang::Sema::ArithConvKind
ArithConvKind
Context in which we're performing a usual arithmetic conversion.
Definition: Sema.h:12331
clang::Sema::ParserCompletionContext
ParserCompletionContext
Describes the context in which code completion occurs.
Definition: Sema.h:13203
clang::Sema::ImplicitlyDefineFunction
NamedDecl * ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S)
ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an...
Definition: SemaDecl.cpp:15858
clang::Sema::getPrintable
static unsigned getPrintable(unsigned I)
Definition: Sema.h:2180
clang::SourceLocation::getHashValue
unsigned getHashValue() const
Definition: SourceLocation.cpp:53
clang::Sema::DefaultFunctionArrayLvalueConversion
ExprResult DefaultFunctionArrayLvalueConversion(Expr *E, bool Diagnose=true)
Definition: SemaExpr.cpp:740
clang::Sema::ActOnStaticAssertDeclaration
Decl * ActOnStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
Definition: SemaDeclCXX.cpp:16617
clang::Sema::deepTypeCheckForSYCLDevice
void deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet< QualType > Visited, ValueDecl *DeclToCheck)
Definition: SemaSYCL.cpp:58
clang::Sema::AlignPackInfo::operator==
bool operator==(const AlignPackInfo &Info) const
Definition: Sema.h:560
clang::Sema::diagnoseExprIntendedAsTemplateName
void diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater)
Definition: SemaTemplate.cpp:622
clang::Sema::PCSK_Invalid
@ PCSK_Invalid
Definition: Sema.h:451
clang::Sema::isCUDAImplicitHostDeviceFunction
static bool isCUDAImplicitHostDeviceFunction(const FunctionDecl *D)
Definition: SemaCUDA.cpp:266
clang::Sema::LookupDestructor
CXXDestructorDecl * LookupDestructor(CXXRecordDecl *Class)
Look for the destructor of the given class.
Definition: SemaLookup.cpp:3631
clang::TemplateParameterList
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition: DeclTemplate.h:71
clang::Sema::ContextRAII::~ContextRAII
~ContextRAII()
Definition: Sema.h:1036
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1779
clang::Sema::ActOnObjCExceptionDecl
Decl * ActOnObjCExceptionDecl(Scope *S, Declarator &D)
Definition: SemaDeclObjC.cpp:5186
clang::Sema::ActOnOpenMPThreadprivateDirective
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList)
Called on well-formed '#pragma omp threadprivate'.
Definition: SemaOpenMP.cpp:3154
clang::Sema::PendingImplicitInstantiation
std::pair< ValueDecl *, SourceLocation > PendingImplicitInstantiation
An entity for which implicit template instantiation is required.
Definition: Sema.h:9819
clang::Sema::OpenMPVarListDataTy::MotionModifiers
SmallVector< OpenMPMotionModifierKind, NumberOfOMPMotionModifiers > MotionModifiers
Definition: Sema.h:11989
clang::Sema::AlignPackIncludeStack
SmallVector< AlignPackIncludeState, 8 > AlignPackIncludeStack
Definition: Sema.h:693
clang::Sema::ActOnOpenMPDynamicAllocatorsClause
OMPClause * ActOnOpenMPDynamicAllocatorsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'dynamic_allocators' clause.
Definition: SemaOpenMP.cpp:17501
clang::Sema::MaybeBindToTemporary
ExprResult MaybeBindToTemporary(Expr *E)
MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor,...
Definition: SemaExprCXX.cpp:7156
clang::Sema::DiagnoseAmbiguousLookup
void DiagnoseAmbiguousLookup(LookupResult &Result)
Produce a diagnostic describing the ambiguity that resulted from name lookup.
Definition: SemaLookup.cpp:2792
clang::Sema::ActOnTemplateIdType
TypeResult ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, bool IsCtorOrDtorName=false, bool IsClassName=false, ImplicitTypenameContext AllowImplicitTypename=ImplicitTypenameContext::No)
Definition: SemaTemplate.cpp:4076
clang::ObjCTypeParamVariance
ObjCTypeParamVariance
Describes the variance of a given generic parameter.
Definition: DeclObjC.h:554
clang::Sema::ActOnCoyieldExpr
ExprResult ActOnCoyieldExpr(Scope *S, SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:914
clang::Sema::SimplerImplicitMoveMode::ForceOff
@ ForceOff
clang::Sema::SpecialMemberOverloadResult::getMethod
CXXMethodDecl * getMethod() const
Definition: Sema.h:1438
clang::Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic
bool MaybeEmitAmbiguousAtomicConstraintsDiagnostic(NamedDecl *D1, ArrayRef< const Expr * > AC1, NamedDecl *D2, ArrayRef< const Expr * > AC2)
If D1 was not at least as constrained as D2, but would've been if a pair of atomic constraints involv...
Definition: SemaConcept.cpp:1424
clang::Sema::TagUseKind
TagUseKind
Definition: Sema.h:3307
clang::Sema::CUDAVariableTarget
CUDAVariableTarget
Definition: Sema.h:13065
clang::CoroutineBodyStmt::CtorArgs
Definition: StmtCXX.h:346
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition: DeclObjC.h:2531
clang::Sema::isInOpenMPTaskUntiedContext
bool isInOpenMPTaskUntiedContext() const
Return true if currently in OpenMP task with untied clause context.
Definition: SemaOpenMP.cpp:2288
clang::Sema::ActOnOpenMPDefaultClause
OMPClause * ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'default' clause.
Definition: SemaOpenMP.cpp:16768
clang::TypeDecl
Represents a declaration of a type.
Definition: Decl.h:3246
clang::Sema::CodeCompleteTypeQualifiers
void CodeCompleteTypeQualifiers(DeclSpec &DS)
Definition: SemaCodeComplete.cpp:5860
clang::Sema::OCK_Category
@ OCK_Category
Definition: Sema.h:10176
llvm::DenseSet
Definition: Sema.h:77
clang::Sema::AA_Passing
@ AA_Passing
Definition: Sema.h:3709
clang::Sema::CheckRedeclarationInModule
bool CheckRedeclarationInModule(NamedDecl *New, NamedDecl *Old)
Definition: SemaDecl.cpp:1734
clang::Sema::MaybeCreateStmtWithCleanups
Stmt * MaybeCreateStmtWithCleanups(Stmt *SubStmt)
Definition: SemaExprCXX.cpp:7349
clang::tok::ObjCKeywordKind
ObjCKeywordKind
Provides a namespace for Objective-C keywords which start with an '@'.
Definition: TokenKinds.h:41
clang::Sema::ActOnSEHExceptBlock
StmtResult ActOnSEHExceptBlock(SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
Definition: SemaStmt.cpp:4573
clang::Sema::ActOnOpenMPFlushClause
OMPClause * ActOnOpenMPFlushClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'flush' pseudo clause.
Definition: SemaOpenMP.cpp:20456
clang::Sema::WarnOnPendingNoDerefs
void WarnOnPendingNoDerefs(ExpressionEvaluationContextRecord &Rec)
Emit a warning for all pending noderef expressions that we recorded.
Definition: SemaExpr.cpp:17734
clang::Sema::LookupParsedName
bool LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope speci...
Definition: SemaLookup.cpp:2715
clang::Sema::mergeBTFDeclTagAttr
BTFDeclTagAttr * mergeBTFDeclTagAttr(Decl *D, const BTFDeclTagAttr &AL)
Definition: SemaDeclAttr.cpp:7529
clang::Sema::isSelfExpr
bool isSelfExpr(Expr *RExpr)
Private Helper predicate to check for 'self'.
Definition: SemaExprObjC.cpp:1916
clang::Sema::ReferenceConversionsScope::Function
@ Function
Definition: Sema.h:12673
clang::Sema::TemplateNameIsRequired
@ TemplateNameIsRequired
Definition: Sema.h:7987
clang::Sema::BuildObjCStringLiteral
ExprResult BuildObjCStringLiteral(SourceLocation AtLoc, StringLiteral *S)
Definition: SemaExprObjC.cpp:82
clang::Sema::setOpenMPCaptureKind
void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level)
Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.) for FD based on DSA for the...
Definition: SemaOpenMP.cpp:2599
clang::Sema::BuildClassMessageImplicit
ExprResult BuildClassMessageImplicit(QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2431
clang::Sema::ObjCMessageKind
ObjCMessageKind
Describes the kind of message expression indicated by a message send that starts with an identifier.
Definition: Sema.h:10441
clang::Sema::ActOnPragmaMSStrictGuardStackCheck
void ActOnPragmaMSStrictGuardStackCheck(SourceLocation PragmaLocation, PragmaMsStackAction Action, bool Value)
ActOnPragmaMSStrictGuardStackCheck - Called on well formed #pragma strict_gs_check.
Definition: SemaAttr.cpp:781
clang::Sema::getLocForEndOfToken
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset=0)
Calls Lexer::getLocForEndOfToken()
Definition: Sema.cpp:57
clang::Sema::CodeCompleteMemberReferenceExpr
void CodeCompleteMemberReferenceExpr(Scope *S, Expr *Base, Expr *OtherOpBase, SourceLocation OpLoc, bool IsArrow, bool IsBaseExprStatement, QualType PreferredType)
Definition: SemaCodeComplete.cpp:5614
clang::Sema::CXXThisScopeRAII::~CXXThisScopeRAII
~CXXThisScopeRAII()
Definition: SemaExprCXX.cpp:1245
clang::Sema::DeduceFunctionTypeFromReturnExpr
bool DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *RetExpr, const AutoType *AT)
Deduce the return type for a function from a returned expression, per C++1y [dcl.spec....
Definition: SemaStmt.cpp:3779
clang::Sema::PCC_ForInit
@ PCC_ForInit
Code completion occurs at the beginning of the initialization statement (or expression) in a for loop...
Definition: Sema.h:13230
clang::Sema::ActOnStartExportDecl
Decl * ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc)
We have parsed the start of an export declaration, including the '{' (if present).
Definition: SemaModule.cpp:739
clang::Sema::ActOnOpenMPDeclareTargetName
void ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, DeclareTargetContextInfo &DTCI)
Called on correct id-expression from the '#pragma omp declare target'.
Definition: SemaOpenMP.cpp:22916
clang::Sema::PragmaAttributeEntry::Attribute
ParsedAttr * Attribute
Definition: Sema.h:744
clang::Sema::DeduceTemplateArguments
TemplateDeductionResult DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
Perform template argument deduction to determine whether the given template arguments match the given...
Definition: SemaTemplateDeduction.cpp:3046
clang::OpenCLOptions
OpenCL supported extensions and optional core features.
Definition: OpenCLOptions.h:69
clang::Sema::ActOnForwardClassDeclaration
DeclGroupPtrTy ActOnForwardClassDeclaration(SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts)
Definition: SemaDeclObjC.cpp:3060
clang::Sema::ParsedFreeStandingDeclSpec
Decl * ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, RecordDecl *&AnonRecord)
ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e....
Definition: SemaDecl.cpp:4832
clang::Sema::FAPK_Fixed
@ FAPK_Fixed
Definition: Sema.h:13403
clang::Sema::NTCUC_AutoVar
@ NTCUC_AutoVar
Definition: Sema.h:2999
clang::Sema::VAK_MSVCUndefined
@ VAK_MSVCUndefined
Definition: Sema.h:12289
clang::Sema::TUK_Declaration
@ TUK_Declaration
Definition: Sema.h:3309
clang::Sema::getCurFPFeatures
FPOptions & getCurFPFeatures()
Definition: Sema.h:1657
clang::EnumConstantDecl
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:3158
clang::Sema::checkTypeSupport
void checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D=nullptr)
Check if the type is allowed to be used for the current target.
Definition: Sema.cpp:1900
clang::Sema::TDK_NonDeducedMismatch
@ TDK_NonDeducedMismatch
A non-depnedent component of the parameter did not match the corresponding component of the argument.
Definition: Sema.h:8987
clang::Sema::FindDeallocationFunctionForDestructor
FunctionDecl * FindDeallocationFunctionForDestructor(SourceLocation StartLoc, CXXRecordDecl *RD)
Definition: SemaExprCXX.cpp:3228
clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII
~PragmaStackSentinelRAII()
Definition: SemaAttr.cpp:42
clang::Sema::ActOnOpenMPInitClause
OMPClause * ActOnOpenMPInitClause(Expr *InteropVar, OMPInteropInfo &InteropInfo, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'init' clause.
Definition: SemaOpenMP.cpp:17637
clang::Sema::getInventedParameterInfos
ArrayRef< InventedTemplateParameterInfo > getInventedParameterInfos() const
Definition: Sema.h:827
clang::Sema::mergeDLLImportAttr
DLLImportAttr * mergeDLLImportAttr(Decl *D, const AttributeCommonInfo &CI)
Definition: SemaDeclAttr.cpp:7885
clang::Sema::BuildBuiltinBitCastExpr
ExprResult BuildBuiltinBitCastExpr(SourceLocation KWLoc, TypeSourceInfo *TSI, Expr *Operand, SourceLocation RParenLoc)
Definition: SemaCast.cpp:394
clang::Sema::ActOnOpenMPLoopnest
StmtResult ActOnOpenMPLoopnest(Stmt *AStmt)
Process a canonical OpenMP loop nest that can either be a canonical literal loop (ForStmt or CXXForRa...
Definition: SemaOpenMP.cpp:5953
clang::Sema::CheckMicrosoftIfExistsSymbol
IfExistsResult CheckMicrosoftIfExistsSymbol(Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo)
Definition: SemaExprCXX.cpp:8880
clang::CXXTryStmt
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:68
clang::Sema::CompleteTypeKind
CompleteTypeKind
Definition: Sema.h:2248
clang::Sema::mergeFormatAttr
FormatAttr * mergeFormatAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Format, int FormatIdx, int FirstArg)
Definition: SemaDeclAttr.cpp:3897
clang::ParsedType
OpaquePtr< QualType > ParsedType
An opaque type for threading parsed type information through the parser.
Definition: Ownership.h:243
clang::Sema::OMPIteratorData::SecColonLoc
SourceLocation SecColonLoc
Definition: Sema.h:5759
clang::Sema::CFError
RecordDecl * CFError
The struct behind the CFErrorRef pointer.
Definition: Sema.h:13732
ExprObjC.h
clang::Sema::CheckInheritingConstructorUsingDecl
bool CheckInheritingConstructorUsingDecl(UsingDecl *UD)
Additional checks for a using declaration referring to a constructor name.
Definition: SemaDeclCXX.cpp:12717
clang::NestedNameSpecifierLoc
A C++ nested-name-specifier augmented with source location information.
Definition: NestedNameSpecifier.h:243
clang::Sema::ActOnMSVCUnknownTypeName
ParsedType ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg)
Attempt to behave like MSVC in situations where lookup of an unqualified type name has failed in a de...
Definition: SemaDecl.cpp:618
clang::Sema::getSelfAssignmentClassMemberCandidate
const FieldDecl * getSelfAssignmentClassMemberCandidate(const ValueDecl *SelfAssigned)
Returns a field in a CXXRecordDecl that has the same name as the decl SelfAssigned when inside a CXXM...
Definition: SemaExpr.cpp:14890
clang::Sema::DiagnoseEmptyStmtBody
void DiagnoseEmptyStmtBody(SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body,...
Definition: SemaChecking.cpp:17053
clang::Sema::CheckShiftOperands
QualType CheckShiftOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, bool IsCompAssign=false)
Definition: SemaExpr.cpp:11957
clang::Sema::BuildCXXDefaultArgExpr
ExprResult BuildCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *Init=nullptr)
BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.
Definition: SemaExpr.cpp:5986
clang::Sema::AlignPackInfo::operator!=
bool operator!=(const AlignPackInfo &Info) const
Definition: Sema.h:566
clang::Sema::ActOnObjCForCollectionStmt
StmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc)
Definition: SemaStmt.cpp:2282
clang::Sema::TentativeAnalysisScope
RAII class used to indicate that we are performing provisional semantic analysis to determine the val...
Definition: Sema.h:9772
clang::Sema::MergeVarDeclTypes
void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declar...
Definition: SemaDecl.cpp:4387
clang::Sema::PureVirtualClassDiagSet
std::unique_ptr< RecordDeclSetTy > PureVirtualClassDiagSet
PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual fu...
Definition: Sema.h:868
clang::Sema::ActOnOpenMPPrivateClause
OMPClause * ActOnOpenMPPrivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'private' clause.
Definition: SemaOpenMP.cpp:17986
clang::format::ScopeType
ScopeType
Definition: TokenAnnotator.h:37
clang::Sema::ExpressionEvaluationContextRecord::NumCleanupObjects
unsigned NumCleanupObjects
The number of active cleanup objects when we entered this expression evaluation context.
Definition: Sema.h:1289
ExprCXX.h
clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext
EnterExpressionEvaluationContext(Sema &Actions, InitListTag, bool ShouldEnter=true)
Definition: Sema.h:13943
clang::Sema::ActOnOpenMPTargetTeamsGenericLoopDirective
StmtResult ActOnOpenMPTargetTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10625
clang::Sema::NonTrivialCUnionKind
NonTrivialCUnionKind
Definition: Sema.h:3019
clang::Sema::ActOnStartDelayedMemberDeclarations
void ActOnStartDelayedMemberDeclarations(Scope *S, Decl *Record)
Definition: SemaDeclCXX.cpp:10436
clang::Sema::isValidSveBitcast
bool isValidSveBitcast(QualType srcType, QualType destType)
Are the two types SVE-bitcast-compatible types? I.e.
Definition: SemaExpr.cpp:7929
clang::Sema::ActOnTagTemplateIdType
TypeResult ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc)
Parsed an elaborated-type-specifier that refers to a template-id, such as class T::template apply.
Definition: SemaTemplate.cpp:4185
clang::Sema::isTagName
TypeSpecifierType isTagName(IdentifierInfo &II, Scope *S)
isTagName() - This method is called for error recovery purposes only to determine if the specified na...
Definition: SemaDecl.cpp:671
Base
clang::Sema::AddMethodTemplateCandidate
void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, OverloadCandidateParamOrder PO={})
Add a C++ member function template as a candidate to the candidate set, using template argument deduc...
Definition: SemaOverload.cpp:7200
clang::Sema::CUDADiagIfHostCode
SemaDiagnosticBuilder CUDADiagIfHostCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
Definition: SemaCUDA.cpp:755
clang::Sema::checkExceptionSpecification
void checkExceptionSpecification(bool IsTopLevel, ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI)
Check the given exception-specification and update the exception specification information with the r...
Definition: SemaDeclCXX.cpp:18397
clang::ASTWriter
Writes an AST file containing the contents of a translation unit.
Definition: ASTWriter.h:85
clang::Sema::TryImplicitConversion
ImplicitConversionSequence TryImplicitConversion(Expr *From, QualType ToType, bool SuppressUserConversions, AllowedExplicit AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
Definition: SemaOverload.cpp:1585
clang::Sema::CheckCXXBooleanCondition
ExprResult CheckCXXBooleanCondition(Expr *CondExpr, bool IsConstexpr=false)
CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
Definition: SemaExprCXX.cpp:4028
clang::Sema::RetainOwnershipKind::CF
@ CF
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:96
clang::Sema::BuildInstanceMessage
ExprResult BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C instance message expression.
Definition: SemaExprObjC.cpp:2835
clang::Sema::ActOnOpenMPDistributeSimdDirective
StmtResult ActOnOpenMPDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:14005
clang::Sema::DelayedDiagnostics::popWithoutEmitting
void popWithoutEmitting(DelayedDiagnosticsState state)
Leave a delayed-diagnostic state that was previously pushed.
Definition: Sema.h:979
clang::Sema::TDK_TooManyArguments
@ TDK_TooManyArguments
When performing template argument deduction for a function template, there were too many call argumen...
Definition: Sema.h:8990
clang::Sema::ActOnOpenMPDeclareReductionDirectiveStart
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveStart(Scope *S, DeclContext *DC, DeclarationName Name, ArrayRef< std::pair< QualType, SourceLocation >> ReductionTypes, AccessSpecifier AS, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare reduction'.
Definition: SemaOpenMP.cpp:22102
clang::Sema::OriginalLexicalContext
DeclContext * OriginalLexicalContext
Generally null except when we temporarily switch decl contexts, like in.
Definition: Sema.h:425
clang::Sema::canThrow
CanThrowResult canThrow(const Stmt *E)
Definition: SemaExceptionSpec.cpp:1125
clang::Sema::CFP_HostDevice
@ CFP_HostDevice
Definition: Sema.h:13088
clang::Sema::isValidPointerAttrType
bool isValidPointerAttrType(QualType T, bool RefOkay=false)
Determine if type T is a valid subject for a nonnull and similar attributes.
Definition: SemaDeclAttr.cpp:1540
clang::Sema::ActOnOpenMPUnifiedAddressClause
OMPClause * ActOnOpenMPUnifiedAddressClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
Definition: SemaOpenMP.cpp:17486
clang::Sema::ActOnOpenMPAllocateDirective
DeclGroupPtrTy ActOnOpenMPAllocateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList, ArrayRef< OMPClause * > Clauses, DeclContext *Owner=nullptr)
Called on well-formed '#pragma omp allocate'.
Definition: SemaOpenMP.cpp:3375
clang::Sema::getDefaultCXXMethodAddrSpace
LangAS getDefaultCXXMethodAddrSpace() const
Returns default addr space for method qualifiers.
Definition: Sema.cpp:1476
clang::Sema::getNSErrorIdent
IdentifierInfo * getNSErrorIdent()
Retrieve the identifier "NSError".
Definition: SemaType.cpp:4130
clang::Sema::ConditionKind::ConstexprIf
@ ConstexprIf
A constant boolean condition from 'if constexpr'.
clang::OpenMPDependClauseKind
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
Definition: OpenMPKinds.h:54
clang::Sema::DiagnoseAvailabilityOfDecl
void DiagnoseAvailabilityOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReceiver=nullptr)
Definition: SemaAvailability.cpp:928
clang::Sema::PCC_Expression
@ PCC_Expression
Code completion occurs within an expression.
Definition: Sema.h:13224
clang::Sema::CodeCompleteLambdaIntroducer
void CodeCompleteLambdaIntroducer(Scope *S, LambdaIntroducer &Intro, bool AfterAmpersand)
Definition: SemaCodeComplete.cpp:6953
clang::Sema::OriginalCallArg::OriginalCallArg
OriginalCallArg(QualType OriginalParamType, bool DecomposedParam, unsigned ArgIdx, QualType OriginalArgType)
Definition: Sema.h:9030
clang::Sema::BuildCXXNestedNameSpecifier
bool BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.
Definition: SemaCXXScopeSpec.cpp:497
clang::Sema::BuildUsingShadowDecl
UsingShadowDecl * BuildUsingShadowDecl(Scope *S, BaseUsingDecl *BUD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
Builds a shadow declaration corresponding to a 'using' declaration.
Definition: SemaDeclCXX.cpp:12174
clang::Sema::DefaultedComparisonKind::ThreeWay
@ ThreeWay
This is an operator<=> that should be implemented as a series of subobject comparisons.
clang::Sema::ActOnOpenMPMetaDirective
StmtResult ActOnOpenMPMetaDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp metadirective' after parsing of the associated statement.
clang::Sema::CCEK_CaseValue
@ CCEK_CaseValue
Expression in a case label.
Definition: Sema.h:3852
clang::Sema::mergeDLLExportAttr
DLLExportAttr * mergeDLLExportAttr(Decl *D, const AttributeCommonInfo &CI)
Definition: SemaDeclAttr.cpp:7898
clang::Sema::ActOnFinishedOpenMPDeclareTargetContext
void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called once a target context is completed, that can be when a '#pragma omp end declare target' was en...
Definition: SemaOpenMP.cpp:22868
clang::Sema::TAH_ConsiderTrivialABI
@ TAH_ConsiderTrivialABI
The triviality of a method affected by "trivial_abi".
Definition: Sema.h:3385
clang::Sema::DefaultedComparisonKind::NotEqual
@ NotEqual
This is an operator!= that should be implemented as a rewrite in terms of a == comparison.
clang::Sema::TPC_FunctionTemplate
@ TPC_FunctionTemplate
Definition: Sema.h:8136
clang::Sema::NSNumberDecl
ObjCInterfaceDecl * NSNumberDecl
The declaration of the Objective-C NSNumber class.
Definition: Sema.h:1176
clang::AtomicExpr::AtomicOp
AtomicOp
Definition: Expr.h:6081
ASTConcept.h
This file provides AST data structures related to concepts.
clang::Sema::LK_String
@ LK_String
Definition: Sema.h:3957
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::FDBaseInfo
DenseMapInfo< clang::CanonicalDeclPtr< clang::FunctionDecl > > FDBaseInfo
Definition: Sema.h:13991
clang::Sema::isVisible
bool isVisible(const NamedDecl *D)
Determine whether a declaration is visible to name lookup.
Definition: Sema.h:2363
clang::Sema::CodeCompleteModuleImport
void CodeCompleteModuleImport(SourceLocation ImportLoc, ModuleIdPath Path)
Definition: SemaCodeComplete.cpp:4282
clang::Sema::ActOnIvar
Decl * ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDec...
Definition: SemaDecl.cpp:18198
clang::Sema::ResolveExceptionSpec
const FunctionProtoType * ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT)
Definition: SemaExceptionSpec.cpp:210
clang::Sema::InstantiatingTemplate::ConstraintNormalization
Definition: Sema.h:9573
clang::Sema::diagnoseMissingImport
void diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl, MissingImportKind MIK, bool Recover=true)
Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import th...
Definition: SemaLookup.cpp:5698
clang::Sema::ContextualImplicitConverter::match
virtual bool match(QualType T)=0
Determine whether the specified type is a valid destination type for this conversion.
clang::Sema::BuildQualifiedTemplateIdExpr
ExprResult BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:4964
clang::Sema::ActOnOpenMPTileDirective
StmtResult ActOnOpenMPTileDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp tile' after parsing of its clauses and the associated statement.
Definition: SemaOpenMP.cpp:14683
clang::IdentifierResolver
IdentifierResolver - Keeps track of shadowed decls on enclosing scopes.
Definition: IdentifierResolver.h:38
clang::Sema::CodeCompleteObjCImplementationCategory
void CodeCompleteObjCImplementationCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
Definition: SemaCodeComplete.cpp:8544
clang::Sema::CodeCompleteDesignator
void CodeCompleteDesignator(const QualType BaseType, llvm::ArrayRef< Expr * > InitExprs, const Designation &D)
Trigger code completion for a record of BaseType.
Definition: SemaCodeComplete.cpp:6438
clang::Sema::ExpressionEvaluationContextRecord::ManglingContextDecl
Decl * ManglingContextDecl
The declaration that provides context for lambda expressions and block literals if the normal declara...
Definition: Sema.h:1304
clang::Sema::TPC_FriendClassTemplate
@ TPC_FriendClassTemplate
Definition: Sema.h:8138
clang::Sema::CodeCompleteObjCPropertySynthesizeIvar
void CodeCompleteObjCPropertySynthesizeIvar(Scope *S, IdentifierInfo *PropertyName)
Definition: SemaCodeComplete.cpp:8622
clang::Sema::MergeFunctionDecl
bool MergeFunctionDecl(FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn)
MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and sco...
Definition: SemaDecl.cpp:3617
clang::Sema::TemplateNameKindForDiagnostics::TemplateTemplateParam
@ TemplateTemplateParam
clang::Sema::InstantiateFunctionDefinition
void InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
Instantiate the definition of the given function from its template.
Definition: SemaTemplateInstantiateDecl.cpp:4801
clang::Sema::IsValueInFlagEnum
bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const
IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum.
Definition: SemaDecl.cpp:19521
clang::Sema::FindCompositePointerType
QualType FindCompositePointerType(SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool ConvertArgs=true)
Definition: Sema.h:12586
clang::Sema::BuildExtVectorType
QualType BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc)
Build an ext-vector type.
Definition: SemaType.cpp:2733
clang::Sema::ActOnNoexceptSpec
ExprResult ActOnNoexceptSpec(Expr *NoexceptExpr, ExceptionSpecificationType &EST)
Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpec...
Definition: SemaExceptionSpec.cpp:82
clang::Sema::DiagnoseFunctionSpecifiers
void DiagnoseFunctionSpecifiers(const DeclSpec &DS)
Diagnose function specifiers on a declaration of an identifier that does not identify a function.
Definition: SemaDecl.cpp:6620
clang::Sema::BuildAtomicExpr
ExprResult BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder=AtomicArgumentOrder::API)
Definition: SemaChecking.cpp:6217
clang::Sema::CheckAltivecInitFromScalar
bool CheckAltivecInitFromScalar(SourceRange R, QualType VecTy, QualType SrcTy)
Definition: SemaCast.cpp:2658
clang::Sema::ActOnExitFunctionContext
void ActOnExitFunctionContext()
Definition: SemaDecl.cpp:1494
clang::Sema::ExpressionEvaluationContextRecord::DelayedDecltypeCalls
SmallVector< CallExpr *, 8 > DelayedDecltypeCalls
If we are processing a decltype type, a set of call expressions for which we have deferred checking t...
Definition: Sema.h:1308
clang::Sema::getCurObjCLexicalContext
const DeclContext * getCurObjCLexicalContext() const
Definition: Sema.h:13761
clang::Sema::PerformOpenMPImplicitIntegerConversion
ExprResult PerformOpenMPImplicitIntegerConversion(SourceLocation OpLoc, Expr *Op)
Definition: SemaOpenMP.cpp:16325
clang::Sema::LOLR_Template
@ LOLR_Template
The lookup found an overload set of literal operator templates, which expect the characters of the sp...
Definition: Sema.h:4377
clang::Sema::PragmaStack::Slot::Slot
Slot(llvm::StringRef StackSlotLabel, ValueType Value, SourceLocation PragmaLocation, SourceLocation PragmaPushLocation)
Definition: Sema.h:601
clang::Sema::InstantiatingSpecializations
llvm::DenseSet< std::pair< Decl *, unsigned > > InstantiatingSpecializations
Specializations whose definitions are currently being instantiated.
Definition: Sema.h:9362
clang::Sema::diagnoseIgnoredQualifiers
void diagnoseIgnoredQualifiers(unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation(), SourceLocation UnalignedQualLoc=SourceLocation())
Definition: SemaType.cpp:3227
x
IRgen optimization opportunities The common pattern of short x
Definition: README.txt:7
clang::Sema::getASTMutationListener
ASTMutationListener * getASTMutationListener() const
Definition: Sema.cpp:533
clang::Sema::checkTargetVersionAttr
bool checkTargetVersionAttr(SourceLocation LiteralLoc, StringRef &Str, bool &isDefault)
Definition: SemaDeclAttr.cpp:3454
clang::Sema::DeclareImplicitDeductionGuides
void DeclareImplicitDeductionGuides(TemplateDecl *Template, SourceLocation Loc)
Declare implicit deduction guides for a class template if we've not already done so.
Definition: SemaTemplate.cpp:2567
clang::Sema::AMK_Redeclaration
@ AMK_Redeclaration
Merge availability attributes for a redeclaration, which requires an exact match.
Definition: Sema.h:3597
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1204
clang::Sema::ActOnObjCAtFinallyStmt
StmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc, Stmt *Body)
Definition: SemaStmt.cpp:4207
clang::Sema::MaybeSuggestAddingStaticToDecl
void MaybeSuggestAddingStaticToDecl(const FunctionDecl *D)
Definition: SemaExpr.cpp:199
clang::Sema::ActOnCoreturnStmt
StmtResult ActOnCoreturnStmt(Scope *S, SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:972
clang::Sema::ActOnOpenMPLinearClause
OMPClause * ActOnOpenMPLinearClause(ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'linear' clause.
Definition: SemaOpenMP.cpp:19939
clang::Sema::ActOnOpenMPNocontextClause
OMPClause * ActOnOpenMPNocontextClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nocontext' clause.
Definition: SemaOpenMP.cpp:17725
clang::Sema::CheckAllocatedType
bool CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R)
Checks that a type is suitable as the allocated type in a new-expression.
Definition: SemaExprCXX.cpp:2446
clang::Sema::DiagnoseUnexpandedParameterPacks
bool DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
Diagnose unexpanded parameter packs.
Definition: SemaTemplateVariadic.cpp:308
clang::Sema::DelayedDiagnostics::shouldDelayDiagnostics
bool shouldDelayDiagnostics()
Determines whether diagnostics should be delayed.
Definition: Sema.h:960
clang::ObjCMessageExpr
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:940
clang::Sema::checkLiteralOperatorId
bool checkLiteralOperatorId(const CXXScopeSpec &SS, const UnqualifiedId &Id, bool IsUDSuffix)
Definition: SemaExprCXX.cpp:492
clang::Sema::CheckQualifiedFunctionForTypeId
bool CheckQualifiedFunctionForTypeId(QualType T, SourceLocation Loc)
Definition: SemaType.cpp:2134
clang::Sema::CodeSynthesisContext::SpecialMember
CXXSpecialMember SpecialMember
The special member being declared or defined.
Definition: Sema.h:9327
clang::Sema::NamedReturnInfo
Definition: Sema.h:5167
clang::Sema::NameClassification::FunctionTemplate
static NameClassification FunctionTemplate(TemplateName Name)
Definition: Sema.h:2722
clang::Sema::actOnDelayedExceptionSpecification
void actOnDelayedExceptionSpecification(Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
Add an exception-specification to the given member function (or member function template).
Definition: SemaDeclCXX.cpp:18446
clang::Sema::AddImplicitMSFunctionNoBuiltinAttr
void AddImplicitMSFunctionNoBuiltinAttr(FunctionDecl *FD)
Only called on function definitions; if there is a pragma in scope with the effect of a range-based n...
Definition: SemaAttr.cpp:1229
clang::Sema::getOpenMPCapturedExpr
ExprResult getOpenMPCapturedExpr(VarDecl *Capture, ExprValueKind VK, ExprObjectKind OK, SourceLocation Loc)
Definition: SemaOpenMP.cpp:17967
clang::Sema::CodeCompleteNaturalLanguage
void CodeCompleteNaturalLanguage()
Definition: SemaCodeComplete.cpp:10094
clang::Sema::PragmaClangSectionAction
PragmaClangSectionAction
Definition: Sema.h:459
clang::Sema::ImplMethodsVsClassMethods
void ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false)
ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the c...
Definition: SemaDeclObjC.cpp:2981
clang::Sema::BuildMemberExpr
MemberExpr * BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec *SS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
Definition: SemaExprMember.cpp:895
clang::Sema::getOpenCLOptions
OpenCLOptions & getOpenCLOptions()
Definition: Sema.h:1656
clang::Sema::ActOnUnaryExprOrTypeTraitExpr
ExprResult ActOnUnaryExprOrTypeTraitExpr(SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, SourceRange ArgRange)
ActOnUnaryExprOrTypeTraitExpr - Handle sizeof(type) and sizeof expr and the same for alignof and __al...
Definition: SemaExpr.cpp:4691
clang::Sema::ActOnOpenMPParallelMaskedTaskLoopSimdDirective
StmtResult ActOnOpenMPParallelMaskedTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel masked taskloop simd' after parsing of the associated sta...
Definition: SemaOpenMP.cpp:13810
clang::sema::SemaPPCallbacks
Definition: Sema.cpp:134
clang::Sema::ProcessDeclAttributeOptions::IgnoreTypeAttributes
bool IgnoreTypeAttributes
Definition: Sema.h:4663
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::getTombstoneKey
static FunctionDeclAndLoc getTombstoneKey()
Definition: Sema.h:13997
clang::Sema::MaybeConvertParenListExprToParenExpr
ExprResult MaybeConvertParenListExprToParenExpr(Scope *S, Expr *ME)
This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a s...
Definition: SemaExpr.cpp:8326
clang::TypeOfKind
TypeOfKind
The kind of 'typeof' expression we're after.
Definition: Type.h:717
clang::Sema::CorrectDelayedTyposInExpr
ExprResult CorrectDelayedTyposInExpr(ExprResult ER, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
Definition: Sema.h:4572
clang::OverloadedOperatorKind
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
Definition: OperatorKinds.h:21
clang::Sema::SemaDiagnosticBuilder::operator<<
const friend SemaDiagnosticBuilder & operator<<(const SemaDiagnosticBuilder &Diag, const T &Value)
Definition: Sema.h:1809
clang::Sema::SetCtorInitializers
bool SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=std::nullopt)
Definition: SemaDeclCXX.cpp:5174
clang::Sema::PoppedFunctionScopeDeleter
Custom deleter to allow FunctionScopeInfos to be kept alive for a short time after they've been poppe...
Definition: Sema.h:1971
clang::Decl::getOwningModule
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Definition: DeclBase.h:808
clang::Sema::CCK_ImplicitConversion
@ CCK_ImplicitConversion
An implicit conversion.
Definition: Sema.h:12203
clang::Sema::addExternalSource
void addExternalSource(ExternalSemaSource *E)
Registers an external source.
Definition: Sema.cpp:542
clang::Sema::AA_Returning
@ AA_Returning
Definition: Sema.h:3710
clang::Sema::IncompatiblePointerSign
@ IncompatiblePointerSign
IncompatiblePointerSign - The assignment is between two pointers types which point to integers which ...
Definition: Sema.h:12392
clang::Sema::TryCapture_ExplicitByVal
@ TryCapture_ExplicitByVal
Definition: Sema.h:5438
clang::Sema::FormatStringInfo
Definition: Sema.h:13410
clang::Sema::ConditionResult
Definition: Sema.h:12791
clang::Sema::AMK_OptionalProtocolImplementation
@ AMK_OptionalProtocolImplementation
Merge availability attributes for an implementation of an optional protocol requirement.
Definition: Sema.h:3606
clang::Sema::FullExprArg::FullExprArg
FullExprArg(Sema &actions)
Definition: Sema.h:4982
clang::Sema::CheckOverload
OverloadKind CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool UseMemberUsingDeclRules)
Determine whether the given New declaration is an overload of the declarations in Old.
Definition: SemaOverload.cpp:1116
clang::Sema::BuildObjCSubscriptExpression
ExprResult BuildObjCSubscriptExpression(SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.
Definition: SemaExprObjC.cpp:764
clang::Sema::PopExpressionEvaluationContext
void PopExpressionEvaluationContext()
Definition: SemaExpr.cpp:17969
clang::Sema::mergeUuidAttr
UuidAttr * mergeUuidAttr(Decl *D, const AttributeCommonInfo &CI, StringRef UuidAsWritten, MSGuidDecl *GuidDecl)
Definition: SemaDeclAttr.cpp:6856
clang::Sema::AlignPackInfo::Natural
@ Natural
Definition: Sema.h:497
clang::Sema::checkMSInheritanceAttrOnDefinition
bool checkMSInheritanceAttrOnDefinition(CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling)
Definition: SemaDeclAttr.cpp:4534
clang::Sema::ActOnOpenMPEndDeclareTargetDirective
const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective()
Called at the end of target region i.e. '#pragma omp end declare target'.
Definition: SemaOpenMP.cpp:22862
state
and static some checkers Checker The latter are built on top of the former via the Checker and CheckerVisitor and attempts to isolate them from much of the gore of the internal analysis the analyzer is basically a source code simulator that traces out possible paths of execution The state of the and the combination of state and program point is a node in an exploded which has the entry program point and initial state
Definition: README.txt:30
clang::Sema::SynthesizedFunctionScope
RAII object to handle the state changes required to synthesize a function body.
Definition: Sema.h:1057
clang::Sema::ActOnDeclStmt
StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
Definition: SemaStmt.cpp:73
clang::Sema::LookupNameKind
LookupNameKind
Describes the kind of name lookup to perform.
Definition: Sema.h:4284
clang::Sema::BuildStaticAssertDeclaration
Decl * BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
Definition: SemaDeclCXX.cpp:16762
clang::Sema::CheckThreadLocalForLargeAlignment
void CheckThreadLocalForLargeAlignment(VarDecl *VD)
Definition: SemaDecl.cpp:14231
clang::Sema::CurInitSegLoc
SourceLocation CurInitSegLoc
Definition: Sema.h:733
clang::Sema::VAK_ValidInCXX11
@ VAK_ValidInCXX11
Definition: Sema.h:12287
clang::Sema::ConstraintEvalRAII
Definition: Sema.h:9977
clang::AutoTypeLoc
Definition: TypeLoc.h:2115
clang::Sema::ActOnPragmaVisibility
void ActOnPragmaVisibility(const IdentifierInfo *VisType, SourceLocation PragmaLoc)
ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
Definition: SemaAttr.cpp:1273
clang::Sema::NTCUC_CopyInit
@ NTCUC_CopyInit
Definition: Sema.h:3001
clang::format::hash_combine
static void hash_combine(std::size_t &seed, const T &v)
Definition: UnwrappedLineParser.cpp:598
clang::Sema::PragmaStack::Slot::PragmaPushLocation
SourceLocation PragmaPushLocation
Definition: Sema.h:600
clang::Sema::FormatStringInfo::ArgPassingKind
FormatArgumentPassingKind ArgPassingKind
Definition: Sema.h:13413
clang::Sema::isSameOrCompatibleFunctionType
bool isSameOrCompatibleFunctionType(QualType Param, QualType Arg)
Compare types for equality with respect to possibly compatible function types (noreturn adjustment,...
Definition: SemaTemplateDeduction.cpp:1180
ExternalASTSource.h
clang::Sema::LangOpts
const LangOptions & LangOpts
Definition: Sema.h:407
clang::Sema::DiagnoseUnexpandedParameterPackInRequiresExpr
bool DiagnoseUnexpandedParameterPackInRequiresExpr(RequiresExpr *RE)
If the given requirees-expression contains an unexpanded reference to one of its own parameter packs,...
Definition: SemaTemplateVariadic.cpp:429
clang::Sema::TPC_VarTemplate
@ TPC_VarTemplate
Definition: Sema.h:8135
clang::Sema::LoadExternalWeakUndeclaredIdentifiers
void LoadExternalWeakUndeclaredIdentifiers()
Load weak undeclared identifiers from the external source.
Definition: Sema.cpp:916
clang::Sema::DefineImplicitMoveConstructor
void DefineImplicitMoveConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move const...
Definition: SemaDeclCXX.cpp:15381
clang::Sema::ProcessingContextState
DelayedDiagnosticsState ProcessingContextState
Definition: Sema.h:944
clang::Sema::diagnoseEquivalentInternalLinkageDeclarations
void diagnoseEquivalentInternalLinkageDeclarations(SourceLocation Loc, const NamedDecl *D, ArrayRef< const NamedDecl * > Equiv)
Definition: SemaOverload.cpp:10215
clang::Sema::LookupIvarInObjCMethod
DeclResult LookupIvarInObjCMethod(LookupResult &Lookup, Scope *S, IdentifierInfo *II)
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
Definition: SemaExpr.cpp:2828
clang::Sema::DefaultedFunctionKind::isSpecialMember
bool isSpecialMember() const
Definition: Sema.h:3406
clang::Sema::ActOnUninitializedDecl
void ActOnUninitializedDecl(Decl *dcl)
Definition: SemaDecl.cpp:13528
clang::Sema::ActOnInitializerError
void ActOnInitializerError(Decl *Dcl)
ActOnInitializerError - Given that there was an error parsing an initializer for the given declaratio...
Definition: SemaDecl.cpp:13486
clang::Sema::ArgumentPackSubstitutionRAII
friend class ArgumentPackSubstitutionRAII
Definition: Sema.h:9445
clang::Sema::ActOnSYCLUniqueStableNameExpr
ExprResult ActOnSYCLUniqueStableNameExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, ParsedType ParsedTy)
Definition: SemaExpr.cpp:3590
clang::Sema::ConvertDeclToDeclGroup
DeclGroupPtrTy ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType=nullptr)
Definition: SemaDecl.cpp:59
clang::Sema::RequireCompleteExprType
bool RequireCompleteExprType(Expr *E, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type of the given expression is complete.
Definition: SemaType.cpp:8692
clang::Sema::BuildObjCBridgedCast
ExprResult BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
Definition: SemaExprObjC.cpp:4632
clang::Sema::ACK_CompAssign
@ ACK_CompAssign
A compound assignment expression.
Definition: Sema.h:12341
clang::UsingDecl
Represents a C++ using-declaration.
Definition: DeclCXX.h:3426
clang::Sema::TDK_Incomplete
@ TDK_Incomplete
Template argument deduction did not deduce a value for every template parameter.
Definition: Sema.h:8963
clang::Sema::Global
@ Global
The global module fragment, between 'module;' and a module-declaration.
Definition: Sema.h:1938
clang::Sema::PerformImplicitConversion
ExprResult PerformImplicitConversion(Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType.
Definition: SemaOverload.cpp:1602
clang::Sema::CheckUsingDeclRedeclaration
bool CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
Checks that the given using declaration is not an invalid redeclaration.
Definition: SemaDeclCXX.cpp:12747
clang::Sema::CXXCheckConditionalOperands
QualType CXXCheckConditionalOperands(ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
Check the operands of ?: under C++ semantics.
Definition: SemaExprCXX.cpp:6480
clang::Sema::ImplicitExceptionSpecification::CalledStmt
void CalledStmt(Stmt *S)
Integrate an invoked statement into the collected data.
Definition: SemaDeclCXX.cpp:243
clang::ParsedTemplateArgument
Represents the parsed form of a C++ template argument.
Definition: ParsedTemplate.h:29
clang::Sema::ActOnOpenMPEndAssumesDirective
void ActOnOpenMPEndAssumesDirective()
Called on well-formed '#pragma omp end assumes'.
Definition: SemaOpenMP.cpp:3518
clang::Sema::PushLambdaScope
sema::LambdaScopeInfo * PushLambdaScope()
Definition: Sema.cpp:2134
clang::Sema::ParseObjCEncodeExpression
ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc)
Definition: SemaExprObjC.cpp:1158
clang::Sema::OffsetOfComponent::IdentInfo
IdentifierInfo * IdentInfo
Definition: Sema.h:5958
clang::Sema::ActOnSourceLocExpr
ExprResult ActOnSourceLocExpr(SourceLocExpr::IdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc)
Definition: SemaExpr.cpp:17019
clang::Sema::hasVisibleDefinition
bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
Determine if D has a visible definition.
Definition: SemaType.cpp:8844
clang::Sema::IsInvalidUnlessNestedName
bool IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo, bool EnteringContext)
IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the ...
Definition: SemaCXXScopeSpec.cpp:900
clang::Sema::BuildMatrixType
QualType BuildMatrixType(QualType T, Expr *NumRows, Expr *NumColumns, SourceLocation AttrLoc)
Definition: SemaType.cpp:2793
clang::Sema::tryResolveExplicitSpecifier
bool tryResolveExplicitSpecifier(ExplicitSpecifier &ExplicitSpec)
tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.
Definition: SemaDeclCXX.cpp:13366
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2312
clang::Sema::CorrectTypo
TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
Definition: SemaLookup.cpp:5375
clang::Sema::BuiltinAddPointer
QualType BuiltinAddPointer(QualType BaseType, SourceLocation Loc)
Definition: SemaType.cpp:9343
clang::Sema::NoteAllOverloadCandidates
void NoteAllOverloadCandidates(Expr *E, QualType DestType=QualType(), bool TakingAddress=false)
Definition: SemaOverload.cpp:10643
clang::Sema::ActOnOpenMPFlushDirective
StmtResult ActOnOpenMPFlushDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp flush'.
Definition: SemaOpenMP.cpp:11178
clang::Sema::getElaboratedType
QualType getElaboratedType(ElaboratedTypeKeyword Keyword, const CXXScopeSpec &SS, QualType T, TagDecl *OwnedTagDecl=nullptr)
Retrieve a version of the type 'T' that is elaborated by Keyword, qualified by the nested-name-specif...
Definition: SemaType.cpp:9204
clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution
@ ExplicitTemplateArgumentSubstitution
We are substituting explicit template arguments provided for a function template.
Definition: Sema.h:9211
clang::Sema::ActOnCaseStmt
StmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprResult LHS, SourceLocation DotDotDotLoc, ExprResult RHS, SourceLocation ColonLoc)
Definition: SemaStmt.cpp:510
clang::Sema::SkipBodyInfo::CheckSameAsPrevious
bool CheckSameAsPrevious
Definition: Sema.h:2587
clang::Sema::NamedReturnInfo::Candidate
const VarDecl * Candidate
Definition: Sema.h:5168
clang::Sema::ActOnObjCBoolLiteral
ExprResult ActOnObjCBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
Definition: SemaExpr.cpp:21118
clang::Sema::SizelessTypeDiagnoser::diagnose
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
Definition: Sema.h:2241
clang::Sema::PCC_Condition
@ PCC_Condition
Code completion occurs within the condition of an if, while, switch, or for statement.
Definition: Sema.h:13233
clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for simd' after parsing of the as...
Definition: SemaOpenMP.cpp:14518
clang::Sema::UsualUnaryConversions
ExprResult UsualUnaryConversions(Expr *E)
UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6....
Definition: SemaExpr.cpp:774
clang::Sema::CheckDeductionGuideDeclarator
void CheckDeductionGuideDeclarator(Declarator &D, QualType &R, StorageClass &SC)
Check the validity of a declarator that we parsed for a deduction-guide.
Definition: SemaDeclCXX.cpp:11058
clang::Sema::DiagnoseMultipleMethodInGlobalPool
void DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass)
Definition: SemaDeclObjC.cpp:3596
clang::Sema::hasVisibleMemberSpecialization
bool hasVisibleMemberSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a visible declaration of D that is a member specialization declaration (as oppo...
Definition: SemaLookup.cpp:1753
clang::LateParsedTemplate
Contains a late templated function.
Definition: Sema.h:13970
clang::ExternalSemaSource::ReadExtVectorDecls
virtual void ReadExtVectorDecls(SmallVectorImpl< TypedefNameDecl * > &Decls)
Read the set of ext_vector type declarations known to the external Sema source.
Definition: ExternalSemaSource.h:135
clang::Sema::CheckExplicitlyDefaultedFunction
void CheckExplicitlyDefaultedFunction(Scope *S, FunctionDecl *MD)
Definition: SemaDeclCXX.cpp:7445
clang::Sema::CheckClassTemplate
DeclResult CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
Definition: SemaTemplate.cpp:1812
clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for' after parsing of the associa...
Definition: SemaOpenMP.cpp:14463
clang::Sema::BuildObjCAtThrowStmt
StmtResult BuildObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw)
Definition: SemaStmt.cpp:4230
clang::Sema::HandleFunctionTypeMismatch
void HandleFunctionTypeMismatch(PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.
Definition: SemaOverload.cpp:2968
clang::Sema::checkNSReturnsRetainedReturnType
bool checkNSReturnsRetainedReturnType(SourceLocation loc, QualType type)
Definition: SemaDeclAttr.cpp:5836
clang::Sema::ActOnFinishKNRParamDeclarations
void ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D, SourceLocation LocAfterDecls)
Definition: SemaDecl.cpp:14849
clang::Scope::incrementMSManglingNumber
void incrementMSManglingNumber()
Definition: Scope.h:331
clang::OpaquePtr
Wrapper for void* pointer.
Definition: Ownership.h:50
clang::Sema::NameClassification::getTemplateNameKind
TemplateNameKind getTemplateNameKind() const
Definition: Sema.h:2764
clang::FileNullability::PointerKind
uint8_t PointerKind
Which kind of pointer declarator we saw.
Definition: Sema.h:259
clang::Sema::UnusedPrivateFields
NamedDeclSetType UnusedPrivateFields
Set containing all declared private fields that are not used.
Definition: Sema.h:848
clang::Sema::EnsureTemplateArgumentListConstraints
bool EnsureTemplateArgumentListConstraints(TemplateDecl *Template, const MultiLevelTemplateArgumentList &TemplateArgs, SourceRange TemplateIDRange)
Ensure that the given template arguments satisfy the constraints associated with the given template,...
Definition: SemaConcept.cpp:761
clang::Sema::AssociatedNamespaceSet
llvm::SmallSetVector< DeclContext *, 16 > AssociatedNamespaceSet
Definition: Sema.h:3970
clang::Sema::InstantiateInClassInitializer
bool InstantiateInClassInitializer(SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the definition of a field from the given pattern.
Definition: SemaTemplateInstantiate.cpp:3381
clang::Sema::GlobalMethodPool::insert
std::pair< iterator, bool > insert(std::pair< Selector, Lists > &&Val)
Definition: Sema.h:1517
clang::Sema::mergeCodeSegAttr
CodeSegAttr * mergeCodeSegAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name)
Definition: SemaDeclAttr.cpp:3355
clang::Sema::UnusedLocalTypedefNameCandidates
llvm::SmallSetVector< const TypedefNameDecl *, 4 > UnusedLocalTypedefNameCandidates
Set containing all typedefs that are likely unused.
Definition: Sema.h:852
clang::FileNullabilityMap
A mapping from file IDs to a record of whether we've seen nullability information in that file.
Definition: Sema.h:267
clang::Sema::isCFError
bool isCFError(RecordDecl *D)
Definition: SemaType.cpp:4314
clang::Sema::CheckTemplateArgumentList
bool CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &SugaredConverted, SmallVectorImpl< TemplateArgument > &CanonicalConverted, bool UpdateArgsWithConversions=true, bool *ConstraintsNotSatisfied=nullptr)
Check that the given template arguments can be provided to the given template, converting the argumen...
Definition: SemaTemplate.cpp:5826
clang::Sema::ActOnCXXEnterDeclaratorScope
bool ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS)
ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifi...
Definition: SemaCXXScopeSpec.cpp:1090
clang::OverloadCandidateSet
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13....
Definition: Overload.h:951
clang::LangAS
LangAS
Defines the address space values used by the address space qualifier of QualType.
Definition: AddressSpaces.h:25
clang::Sema::NamedDeclSetType
llvm::SmallSetVector< NamedDecl *, 16 > NamedDeclSetType
Definition: Sema.h:845
clang::Sema::ActOnOpenMPHasDeviceAddrClause
OMPClause * ActOnOpenMPHasDeviceAddrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'has_device_addr' clause.
Definition: SemaOpenMP.cpp:23372
clang::Sema::StdCoroutineTraitsCache
ClassTemplateDecl * StdCoroutineTraitsCache
The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
Definition: Sema.h:1156
clang::NSAPI::NumNSNumberLiteralMethods
static const unsigned NumNSNumberLiteralMethods
Definition: NSAPI.h:191
clang::Sema::PragmaStack::Slot::StackSlotLabel
llvm::StringRef StackSlotLabel
Definition: Sema.h:597
clang::Sema::containsUnexpandedParameterPacks
bool containsUnexpandedParameterPacks(Declarator &D)
Determine whether the given declarator contains any unexpanded parameter packs.
Definition: SemaTemplateVariadic.cpp:864
clang::Sema::AbstractReturnType
@ AbstractReturnType
Definition: Sema.h:7937
clang::Sema::isAcceptableTagRedeclaration
bool isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name)
Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declarati...
Definition: SemaDecl.cpp:16421
clang::sema::FunctionScopeInfo
Retains information about a function, method, or block that is currently being parsed.
Definition: ScopeInfo.h:102
clang::Sema::ActOnStartHLSLBuffer
Decl * ActOnStartHLSLBuffer(Scope *BufferScope, bool CBuffer, SourceLocation KwLoc, IdentifierInfo *Ident, SourceLocation IdentLoc, SourceLocation LBrace)
Definition: SemaHLSL.cpp:15
clang::Sema::SemaDiagnosticBuilder::K_Deferred
@ K_Deferred
Create a deferred diagnostic, which is emitted only if the function it's attached to is codegen'ed.
Definition: Sema.h:1784
clang::Sema::DiagnoseShadowingLambdaDecls
void DiagnoseShadowingLambdaDecls(const sema::LambdaScopeInfo *LSI)
Diagnose shadowing for variables shadowed in the lambda record LambdaRD when these variables are capt...
Definition: SemaDecl.cpp:8282
clang::Sema::ActOnOpenMPDeclareMapperDirective
DeclGroupPtrTy ActOnOpenMPDeclareMapperDirective(Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType, SourceLocation StartLoc, DeclarationName VN, AccessSpecifier AS, Expr *MapperVarRef, ArrayRef< OMPClause * > Clauses, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare mapper'.
Definition: SemaOpenMP.cpp:22357
clang::Sema::HandleField
FieldDecl * HandleField(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS)
HandleField - Analyze a field of a C struct or a C++ data member.
Definition: SemaDecl.cpp:17829
clang::Sema::ActOnCapScopeReturnStmt
StmtResult ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves)
ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.
Definition: SemaStmt.cpp:3571
clang::Sema::ActOnForEachDeclStmt
void ActOnForEachDeclStmt(DeclGroupPtrTy Decl)
Definition: SemaStmt.cpp:83
clang::Sema::CreateBuiltinMatrixSubscriptExpr
ExprResult CreateBuiltinMatrixSubscriptExpr(Expr *Base, Expr *RowIdx, Expr *ColumnIdx, SourceLocation RBLoc)
Definition: SemaExpr.cpp:4979
clang::Sema::MarkDeclarationsReferencedInExpr
void MarkDeclarationsReferencedInExpr(Expr *E, bool SkipLocalVariables=false, ArrayRef< const Expr * > StopAt=std::nullopt)
Mark any declarations that appear within this expression or any potentially-evaluated subexpressions ...
Definition: SemaExpr.cpp:20144
clang::Sema::diagnoseTypo
void diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
Definition: SemaLookup.cpp:5672
clang::Sema::PragmaStack::Act
void Act(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, ValueType Value)
Definition: Sema.h:608
clang::Sema::getCurGenericLambda
sema::LambdaScopeInfo * getCurGenericLambda()
Retrieve the current generic lambda info, if any.
Definition: Sema.cpp:2371
clang::UnexpandedParameterPack
std::pair< llvm::PointerUnion< const TemplateTypeParmType *, const SubstTemplateTypeParmPackType *, const SubstNonTypeTemplateParmPackExpr *, const NamedDecl * >, SourceLocation > UnexpandedParameterPack
Definition: Sema.h:245
clang::Sema::tryConvertExprToType
ExprResult tryConvertExprToType(Expr *E, QualType Ty)
Try to convert an expression E to type Ty.
Definition: SemaExpr.cpp:4971
clang::Sema::PSK_Show
@ PSK_Show
Definition: Sema.h:481
clang::Sema::getTemplateInstantiationArgs
MultiLevelTemplateArgumentList getTemplateInstantiationArgs(const NamedDecl *D, bool Final=false, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr, bool ForConstraintInstantiation=false, bool SkipForSpecialization=false)
Retrieve the template argument list(s) that should be used to instantiate the definition of the given...
Definition: SemaTemplateInstantiate.cpp:289
clang::Sema::canDelayFunctionBody
bool canDelayFunctionBody(const Declarator &D)
Determine whether we can delay parsing the body of a function or function template until it is used,...
Definition: SemaDecl.cpp:15319
clang::Sema::FinalizeDeclaratorGroup
DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
Definition: SemaDecl.cpp:14412
clang::Sema::LookupBinOp
void LookupBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, UnresolvedSetImpl &Functions)
Definition: SemaExpr.cpp:15587
clang::Sema::CheckForwardProtocolDeclarationForCircularDependency
bool CheckForwardProtocolDeclarationForCircularDependency(IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
Definition: SemaDeclObjC.cpp:1193
clang::Sema::CCEK_TemplateArg
@ CCEK_TemplateArg
Value of a non-type template parameter.
Definition: Sema.h:3854
clang::Sema::DeleteExprLoc
std::pair< SourceLocation, bool > DeleteExprLoc
Delete-expressions to be analyzed at the end of translation unit.
Definition: Sema.h:859
clang::LangOptions::FPModeKind
FPModeKind
Definition: LangOptions.h:255
clang::Sema::TemplateNameKindForDiagnostics
TemplateNameKindForDiagnostics
Describes the detailed kind of a template name. Used in diagnostics.
Definition: Sema.h:2827
clang::Sema::PerformObjectMemberConversion
ExprResult PerformObjectMemberConversion(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
Cast a base object to a member's actual type.
Definition: SemaExpr.cpp:3003
clang::Sema::DefineImplicitMoveAssignment
void DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared move assignment operator.
Definition: SemaDeclCXX.cpp:14937
clang::Sema::FunctionScopeRAII::~FunctionScopeRAII
~FunctionScopeRAII()
Definition: Sema.h:5050
clang::Sema::InstantiatingTemplate::InstantiatingTemplate
InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation, Decl *Entity, SourceRange InstantiationRange=SourceRange())
Note that we are instantiating a class template, function template, variable template,...
Definition: SemaTemplateInstantiate.cpp:415
clang::ConstexprSpecKind
ConstexprSpecKind
Define the kind of constexpr specifier.
Definition: Specifiers.h:32
clang::Sema::mergeVisibilityAttr
VisibilityAttr * mergeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI, VisibilityAttr::VisibilityType Vis)
Definition: SemaDeclAttr.cpp:2867
clang::Sema::RebuildTemplateParamsInCurrentInstantiation
bool RebuildTemplateParamsInCurrentInstantiation(TemplateParameterList *Params)
Rebuild the template parameters now that we know we're in a current instantiation.
Definition: SemaTemplate.cpp:11220
clang::Sema::ActOnObjCTemporaryExitContainerContext
void ActOnObjCTemporaryExitContainerContext(ObjCContainerDecl *ObjCCtx)
Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constr...
Definition: SemaDecl.cpp:17701
clang::Sema::AddConversionCandidate
void AddConversionCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over...
Definition: SemaOverload.cpp:7452
clang::Sema::ActOnOpenMPParallelSectionsDirective
StmtResult ActOnOpenMPParallelSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:11016
clang::Sema::CheckLoopHintExpr
bool CheckLoopHintExpr(Expr *E, SourceLocation Loc)
Definition: SemaExpr.cpp:3720
clang::Sema::NTK_NonClass
@ NTK_NonClass
Definition: Sema.h:3288
clang::Sema::DeleteLocs
llvm::SmallVector< DeleteExprLoc, 4 > DeleteLocs
Definition: Sema.h:860
clang::Sema::ConvertIntegerToTypeWarnOnOverflow
void ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID)
ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign...
clang::Sema::ActOnObjCAutoreleasePoolStmt
StmtResult ActOnObjCAutoreleasePoolStmt(SourceLocation AtLoc, Stmt *Body)
Definition: SemaStmt.cpp:4330
clang::Sema::ActOnOpenMPParallelMaskedTaskLoopDirective
StmtResult ActOnOpenMPParallelMaskedTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel masked taskloop' after parsing of the associated statemen...
Definition: SemaOpenMP.cpp:13684
clang::Sema::CheckUnresolvedMemberAccess
AccessResult CheckUnresolvedMemberAccess(UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
Perform access-control checking on a previously-unresolved member access which has now been resolved ...
Definition: SemaAccess.cpp:1564
clang::Sema::PragmaClangSection
Definition: Sema.h:464
clang::AccessSpecifier
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:111
clang::Sema::LocsWithCUDACallDiags
llvm::DenseSet< FunctionDeclAndLoc > LocsWithCUDACallDiags
FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" d...
Definition: Sema.h:12965
clang::Sema::shouldLinkDependentDeclWithPrevious
bool shouldLinkDependentDeclWithPrevious(Decl *D, Decl *OldDecl)
Checks if the new declaration declared in dependent context must be put in the same redeclaration cha...
Definition: SemaDecl.cpp:10822
clang::Sema::PerformPendingInstantiations
void PerformPendingInstantiations(bool LocalOnly=false)
Performs template instantiation for all implicit template instantiations we have seen until this poin...
Definition: SemaTemplateInstantiateDecl.cpp:6315
clang::Sema::ArgumentDependentLookup
void ArgumentDependentLookup(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
Definition: SemaLookup.cpp:3827
clang::ObjCObjectPointerType
Represents a pointer to an Objective C object.
Definition: Type.h:6283
clang::Sema::CheckOverridingFunctionAttributes
bool CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old)
Definition: SemaDeclCXX.cpp:17647
clang::Sema::ActOnPragmaFPExceptions
void ActOnPragmaFPExceptions(SourceLocation Loc, LangOptions::FPExceptionModeKind)
Called on well formed '#pragma clang fp' that has option 'exceptions'.
Definition: SemaAttr.cpp:1362
clang::Sema::FinalizeVarWithDestructor
void FinalizeVarWithDestructor(VarDecl *VD, const RecordType *DeclInitType)
FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.
Definition: SemaDeclCXX.cpp:15671
clang::Sema::ExpressionEvaluationContextRecord::isDiscardedStatementContext
bool isDiscardedStatementContext() const
Definition: Sema.h:1394
clang::Sema::MaybeODRUseExprs
MaybeODRUseExprSet MaybeODRUseExprs
Definition: Sema.h:799
clang::Sema::BoundTypeDiagnoser::emit
void emit(const SemaDiagnosticBuilder &DB, std::index_sequence< Is... >) const
Definition: Sema.h:2201
clang::Sema::buildOverloadedCallSet
bool buildOverloadedCallSet(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result)
Constructs and populates an OverloadedCandidateSet from the given function.
Definition: SemaOverload.cpp:13280
clang::Sema::CheckParamExceptionSpec
bool CheckParamExceptionSpec(const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalen...
Definition: SemaExceptionSpec.cpp:891
clang::Sema::IsQualificationConversion
bool IsQualificationConversion(QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToTy...
Definition: SemaOverload.cpp:3388
clang::Sema::DeviceKnownEmittedFns
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, FunctionDeclAndLoc > DeviceKnownEmittedFns
An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus th...
Definition: Sema.h:12974
clang::Sema::HideUsingShadowDecl
void HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow)
Hides a using shadow declaration.
Definition: SemaDeclCXX.cpp:12244
clang::Sema::CVT_Both
@ CVT_Both
Emitted on host side only.
Definition: Sema.h:13068
clang::Sema::HandleDelayedAccessCheck
void HandleDelayedAccessCheck(sema::DelayedDiagnostic &DD, Decl *Ctx)
Definition: SemaAccess.cpp:1482
clang::Sema::LazilyCreateBuiltin
NamedDecl * LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.
Definition: SemaDecl.cpp:2417
clang::Sema::MarkTypoCorrectedFunctionDefinition
void MarkTypoCorrectedFunctionDefinition(const NamedDecl *F)
Definition: SemaDecl.cpp:8850
clang::Sema::ActOnTemplateName
TemplateNameKind ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool AllowInjectedClassName=false)
Form a template name from a name that is syntactically required to name a template,...
Definition: SemaTemplate.cpp:5017
clang::CallExpr::ADLCallKind
ADLCallKind
Definition: Expr.h:2869
clang::Sema::getCurrentModule
Module * getCurrentModule() const
Get the module unit whose scope we are currently within.
Definition: Sema.h:2323
clang::Sema::PragmaClangBSSSection
PragmaClangSection PragmaClangBSSSection
Definition: Sema.h:470
clang::Sema::SynthesizedFunctionScope::SynthesizedFunctionScope
SynthesizedFunctionScope(Sema &S, DeclContext *DC)
Definition: Sema.h:1063
clang::Sema::VerifyICEDiagnoser::~VerifyICEDiagnoser
virtual ~VerifyICEDiagnoser()
Definition: Sema.h:12903
clang::Sema::BuildImplicitMemberExpr
ExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
Builds an implicit member access expression.
Definition: SemaExprMember.cpp:1877
clang::Sema::BuildArrayTypeTrait
ExprResult BuildArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
Definition: SemaExprCXX.cpp:5880
clang::Sema::FunctionScopesStart
unsigned FunctionScopesStart
The index of the first FunctionScope that corresponds to the current context.
Definition: Sema.h:809
clang::OMPDependClause::DependDataTy
Definition: OpenMPClause.h:4792
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
clang::Sema::ContextualImplicitConverter::diagnoseNoMatch
virtual SemaDiagnosticBuilder diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
clang::Sema::ReuseLambdaContextDecl_t
ReuseLambdaContextDecl_t
Definition: Sema.h:5394
clang::Sema::VAK_Invalid
@ VAK_Invalid
Definition: Sema.h:12290
clang::Sema::MarkVTableUsed
void MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
Note that the vtable for the given class was used at the given location.
Definition: SemaDeclCXX.cpp:17928
clang::Sema::checkSpecializationVisibility
void checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec)
We've found a use of a templated declaration that would trigger an implicit instantiation.
Definition: SemaTemplate.cpp:11493
clang::Sema::ExpressionEvaluationContext
ExpressionEvaluationContext
Describes how the expressions currently being parsed are evaluated at run-time, if at all.
Definition: Sema.h:1226
clang::Sema::CodeSynthesisContext::Memoization
@ Memoization
Added for Template instantiation observation.
Definition: Sema.h:9291
clang::Sema::IER_Dependent
@ IER_Dependent
The name is a dependent name, so the results will differ from one instantiation to the next.
Definition: Sema.h:6013
clang::DeclaratorChunk::ParamInfo
ParamInfo - An array of paraminfo objects is allocated whenever a function declarator is parsed.
Definition: DeclSpec.h:1274
clang::Sema::OriginalCallArg::ArgIdx
unsigned ArgIdx
Definition: Sema.h:9038
clang::Sema::FindProtocolDeclaration
void FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef< IdentifierLocPair > ProtocolId, SmallVectorImpl< Decl * > &Protocols)
FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declare...
Definition: SemaDeclObjC.cpp:1314
clang::Sema::ActOnStmtExprResult
ExprResult ActOnStmtExprResult(ExprResult E)
Definition: SemaExpr.cpp:16178
clang::Sema::IncompatibleObjCWeakRef
@ IncompatibleObjCWeakRef
IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an object with __weak qualifier.
Definition: Sema.h:12434
clang::Sema::hasReachableDefinition
bool hasReachableDefinition(NamedDecl *D)
Definition: Sema.h:2418
clang::Sema::PopForceCUDAHostDevice
bool PopForceCUDAHostDevice()
Decrements our count of the number of times we've seen a pragma forcing functions to be host device.
Definition: SemaCUDA.cpp:42
clang::Sema::getLookupModules
llvm::DenseSet< Module * > & getLookupModules()
Get the set of additional modules that should be checked during name lookup.
Definition: SemaLookup.cpp:1556
clang::Sema::FPFeaturesStateRAII::FPFeaturesStateRAII
FPFeaturesStateRAII(Sema &S)
Definition: Sema.cpp:2697
clang::Sema::OMPIteratorData::DeclIdentLoc
SourceLocation DeclIdentLoc
Definition: Sema.h:5754
clang::Sema::TDK_InstantiationDepth
@ TDK_InstantiationDepth
Template argument deduction exceeded the maximum template instantiation depth (which has already been...
Definition: Sema.h:8960
clang::Sema::CheckObjCMethodDirectOverrides
void CheckObjCMethodDirectOverrides(ObjCMethodDecl *method, ObjCMethodDecl *overridden)
Definition: SemaDeclObjC.cpp:4424
clang::Sema::BSSSegStack
PragmaStack< StringLiteral * > BSSSegStack
Definition: Sema.h:696
clang::Sema::CodeSynthesisContext::DefaultFunctionArgumentInstantiation
@ DefaultFunctionArgumentInstantiation
We are instantiating a default argument for a function.
Definition: Sema.h:9207
clang::Sema::BuildMemInitializer
MemInitResult BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
Handle a C++ member initializer.
Definition: SemaDeclCXX.cpp:4240
clang::Sema::LookupInlineAsmIdentifier
ExprResult LookupInlineAsmIdentifier(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool IsUnevaluatedContext)
Definition: SemaStmtAsm.cpp:774
clang::sema::AnalysisBasedWarnings::Policy
Definition: AnalysisBasedWarnings.h:33
clang::Sema::DiagnoseUnguardedAvailabilityViolations
void DiagnoseUnguardedAvailabilityViolations(Decl *FD)
Issue any -Wunguarded-availability warnings in FD.
Definition: SemaAvailability.cpp:892
clang::Sema::LateParsedTemplateMap
LateParsedTemplateMapT LateParsedTemplateMap
Definition: Sema.h:920
clang::Sema::SYCLDiagIfDeviceCode
SemaDiagnosticBuilder SYCLDiagIfDeviceCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
Definition: SemaSYCL.cpp:21
clang::Sema::SetParamDefaultArgument
void SetParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
Definition: SemaDeclCXX.cpp:300
clang::Sema::getExternalSource
ExternalSemaSource * getExternalSource() const
Definition: Sema.h:1665
clang::Sema::ActOnSEHLeaveStmt
StmtResult ActOnSEHLeaveStmt(SourceLocation Loc, Scope *CurScope)
Definition: SemaStmt.cpp:4600
clang::Sema::getNonTagTypeDeclKind
NonTagKind getNonTagTypeDeclKind(const Decl *D, TagTypeKind TTK)
Given a non-tag type declaration, returns an enum useful for indicating what kind of non-tag type thi...
Definition: SemaDecl.cpp:16392
clang::Sema::NameClassification::NameClassification
NameClassification(ParsedType Type)
Definition: Sema.h:2678
clang::Sema::StdAlignValT
LazyDeclPtr StdAlignValT
The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.
Definition: Sema.h:1144
clang::tok::TokenKind
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
Definition: TokenKinds.h:25
clang::Sema::ActOnUndeclaredTypeTemplateName
void ActOnUndeclaredTypeTemplateName(Scope *S, TemplateTy &Name, TemplateNameKind &TNK, SourceLocation NameLoc, IdentifierInfo *&II)
Try to resolve an undeclared template name as a type template.
Definition: SemaTemplate.cpp:4023
clang::Sema::CheckCXXDefaultArguments
void CheckCXXDefaultArguments(FunctionDecl *FD)
CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-form...
Definition: SemaDeclCXX.cpp:1618
clang::Sema::FPFeaturesStateRAII::~FPFeaturesStateRAII
~FPFeaturesStateRAII()
Definition: Sema.cpp:2703
clang::Sema::InventAbbreviatedTemplateParameterTypeName
IdentifierInfo * InventAbbreviatedTemplateParameterTypeName(IdentifierInfo *ParamName, unsigned Index)
Invent a new identifier for parameters of abbreviated templates.
Definition: Sema.cpp:92
clang::Sema::computeDeclContext
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
Definition: SemaCXXScopeSpec.cpp:53
clang::Sema::PragmaPackInfo::SlotLabel
StringRef SlotLabel
Definition: Sema.h:488
clang::Sema::DefaultedComparisonKind
DefaultedComparisonKind
Kinds of defaulted comparison operator functions.
Definition: Sema.h:1564
clang::Sema::ActOnReenterTemplateScope
unsigned ActOnReenterTemplateScope(Decl *Template, llvm::function_ref< Scope *()> EnterScope)
Definition: SemaDeclCXX.cpp:10370
clang::Sema::CheckImplicitSpecialMemberDeclaration
void CheckImplicitSpecialMemberDeclaration(Scope *S, FunctionDecl *FD)
Check a completed declaration of an implicit special member.
Definition: SemaDeclCXX.cpp:13478
clang::Sema::ActOnRequiresClause
ExprResult ActOnRequiresClause(ExprResult ConstraintExpr)
Definition: SemaDeclCXX.cpp:4045
clang::Sema::SemaBuiltinShuffleVector
ExprResult SemaBuiltinShuffleVector(CallExpr *TheCall)
SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
Definition: SemaChecking.cpp:7651
clang::Sema::CUDAFunctionPreference
CUDAFunctionPreference
Definition: Sema.h:13083
clang::Sema::DeclGroupPtrTy
OpaquePtr< DeclGroupRef > DeclGroupPtrTy
Definition: Sema.h:400
clang::ast_matchers::decl
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
Definition: ASTMatchersInternal.cpp:735
clang::Sema::CheckUnaryExprOrTypeTraitOperand
bool CheckUnaryExprOrTypeTraitOperand(Expr *E, UnaryExprOrTypeTrait ExprKind)
Check the constraints on expression operands to unary type expression and type traits.
Definition: SemaExpr.cpp:4262
P
StringRef P
Definition: ASTMatchersInternal.cpp:564
clang::Sema::FAPK_Variadic
@ FAPK_Variadic
Definition: Sema.h:13404
clang::Sema::UnusedFileScopedDecls
UnusedFileScopedDeclsType UnusedFileScopedDecls
The set of file scoped decls seen so far that have not been used and must warn if not used.
Definition: Sema.h:893
clang::Sema::OCK_Interface
@ OCK_Interface
Definition: Sema.h:10174
clang::Sema::CTK_ErrorRecovery
@ CTK_ErrorRecovery
Definition: Sema.h:4526
clang::Sema::BuildForRangeBeginEndCall
ForRangeStatus BuildForRangeBeginEndCall(SourceLocation Loc, SourceLocation RangeLoc, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr)
Build a call to 'begin' or 'end' for a C++11 for-range statement.
Definition: SemaOverload.cpp:15317
clang::Sema::ActOnUnaryOp
ExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input, bool IsAfterAmp=false)
Definition: SemaExpr.cpp:16102
clang::Sema::CodeCompleteObjCInstanceMessage
void CodeCompleteObjCInstanceMessage(Scope *S, Expr *Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=nullptr)
Definition: SemaCodeComplete.cpp:8135
clang::Sema::TemplateDeductionResult
TemplateDeductionResult
Describes the result of template argument deduction.
Definition: Sema.h:8953
AccessResult
AccessResult
A copy of Sema's enum without AR_delayed.
Definition: SemaAccess.cpp:30
clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal
bool CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member fun...
Definition: SemaDeclCXX.cpp:3210
clang::Sema::LookupModulesCache
llvm::DenseSet< Module * > LookupModulesCache
Cache of additional modules that should be used for name lookup within the current template instantia...
Definition: Sema.h:9375
clang::Sema::ModuleImportState
ModuleImportState
An enumeration to represent the transition of states in parsing module fragments and imports.
Definition: Sema.h:3152
clang::VK_PRValue
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:123
clang::Sema::AddFactoryMethodToGlobalPool
void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
Definition: Sema.h:4941
clang::Sema::redelayDiagnostics
void redelayDiagnostics(sema::DelayedDiagnosticPool &pool)
Given a set of delayed diagnostics, re-emit them as if they had been delayed in the current context i...
Definition: SemaDeclAttr.cpp:9768
clang::Sema::DiagnoseAssignmentEnum
void DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr)
DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum va...
Definition: SemaStmt.cpp:1628
clang::TemplateSpecializationKind
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
Definition: Specifiers.h:176
clang::Sema::ActOnDependentIdExpression
ExprResult ActOnDependentIdExpression(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed.
Definition: SemaTemplate.cpp:728
clang::Sema::isOpenMPDeclareMapperVarDeclAllowed
bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const
Definition: SemaOpenMP.cpp:22466
clang::Sema::IsRedefinitionInModule
bool IsRedefinitionInModule(const NamedDecl *New, const NamedDecl *Old) const
Definition: SemaDecl.cpp:1760
clang::Sema::DefineImplicitDefaultConstructor
void DefineImplicitDefaultConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default...
Definition: SemaDeclCXX.cpp:13583
clang::Sema::DefaultedFunctionKind
For a defaulted function, the kind of defaulted function that it is.
Definition: Sema.h:3393
clang::Sema::POAK_Reset
@ POAK_Reset
Definition: Sema.h:10580
clang::Sema::Compatible
@ Compatible
Compatible - the types are compatible according to the standard.
Definition: Sema.h:12359
clang::Sema::DeclareGlobalAllocationFunction
void DeclareGlobalAllocationFunction(DeclarationName Name, QualType Return, ArrayRef< QualType > Params)
DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't...
Definition: SemaExprCXX.cpp:3099
clang::Sema::makeModuleVisible
void makeModuleVisible(Module *Mod, SourceLocation ImportLoc)
Definition: Sema.h:2358
clang::Sema::PragmaAttributeEntry::Loc
SourceLocation Loc
Definition: Sema.h:743
clang::Sema::CheckNonTypeTemplateParameterType
QualType CheckNonTypeTemplateParameterType(TypeSourceInfo *&TSI, SourceLocation Loc)
Check that the type of a non-type template parameter is well-formed.
Definition: SemaTemplate.cpp:1291
clang::Sema::QIDNSCopying
QualType QIDNSCopying
id<NSCopying> type.
Definition: Sema.h:1215
clang::Sema::getCurrentInstantiationOf
CXXRecordDecl * getCurrentInstantiationOf(NestedNameSpecifier *NNS)
If the given nested name specifier refers to the current instantiation, return the declaration that c...
Definition: SemaCXXScopeSpec.cpp:179
clang::Sema::BuiltinRemoveReference
QualType BuiltinRemoveReference(QualType BaseType, UTTKind UKind, SourceLocation Loc)
Definition: SemaType.cpp:9399
clang::Sema::IntToBlockPointer
@ IntToBlockPointer
IntToBlockPointer - The assignment converts an int to a block pointer.
Definition: Sema.h:12421
clang::Sema::DefineImplicitCopyAssignment
void DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared copy assignment operator.
Definition: SemaDeclCXX.cpp:14565
clang::Sema::getCurBlock
sema::BlockScopeInfo * getCurBlock()
Retrieve the current block, if any.
Definition: Sema.cpp:2303
clang::Sema::ActOnOpenMPSectionDirective
StmtResult ActOnOpenMPSectionDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp section' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10444
clang::Sema::ActOnOpenMPUsesAllocatorClause
OMPClause * ActOnOpenMPUsesAllocatorClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< UsesAllocatorsData > Data)
Called on well-formed 'uses_allocators' clause.
Definition: SemaOpenMP.cpp:23658
clang::Sema::ObjCArgInfo::NameLoc
SourceLocation NameLoc
Definition: Sema.h:10388
clang::Sema::checkPseudoObjectRValue
ExprResult checkPseudoObjectRValue(Expr *E)
Definition: SemaPseudoObject.cpp:1527
clang::Sema::IsDerivedFrom
bool IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base)
Determine whether the type Derived is a C++ class that is derived from the type Base.
Definition: SemaDeclCXX.cpp:2880
clang::Sema::TDK_DeducedMismatch
@ TDK_DeducedMismatch
After substituting deduced template arguments, a dependent parameter type did not match the correspon...
Definition: Sema.h:8980
clang::Sema::PragmaPackInfo
Definition: Sema.h:486
clang::Sema::ActOnUsingEnumDeclaration
Decl * ActOnUsingEnumDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS=nullptr)
Definition: SemaDeclCXX.cpp:11923
clang::Sema::TypoCorrectionFailures
IdentifierSourceLocations TypoCorrectionFailures
A cache containing identifiers for which typo correction failed and their locations,...
Definition: Sema.h:9805
clang::Sema::TemplateNameKindForDiagnostics::DependentTemplate
@ DependentTemplate
clang::Sema::PerformObjectArgumentInitialization
ExprResult PerformObjectArgumentInitialization(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the...
Definition: SemaOverload.cpp:5574
clang::Sema::BuildBlockPointerType
QualType BuildBlockPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a block pointer type.
Definition: SemaType.cpp:3090
clang::Sema::CodeCompleteAfterFunctionEquals
void CodeCompleteAfterFunctionEquals(Declarator &D)
Definition: SemaCodeComplete.cpp:6995
clang::Sema::getFloat128Identifier
IdentifierInfo * getFloat128Identifier() const
Definition: Sema.cpp:2668
clang::Sema::ImpCastExprToType
ExprResult ImpCastExprToType(Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_PRValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
Definition: Sema.cpp:622
clang::Sema::SubstDecl
Decl * SubstDecl(Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiateDecl.cpp:3989
clang::Sema::FullExprArg::get
Expr * get() const
Definition: Sema.h:4988
clang::Sema::PushExpressionEvaluationContext
void PushExpressionEvaluationContext(ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
Definition: SemaExpr.cpp:17676
clang::Sema::ActOnFriendTypeDecl
Decl * ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
Handle a friend type declaration.
Definition: SemaDeclCXX.cpp:17062
clang::Sema::ExpressionEvaluationContextRecord::isImmediateFunctionContext
bool isImmediateFunctionContext() const
Definition: Sema.h:1379
clang::Sema::CheckQualifiedMemberReference
bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
Definition: SemaExprMember.cpp:552
clang::Sema::BuildReturnStmt
StmtResult BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery=false)
Definition: SemaStmt.cpp:3917
clang::Sema::SuppressedDiagnosticsMap
llvm::DenseMap< Decl *, SmallVector< PartialDiagnosticAt, 1 > > SuppressedDiagnosticsMap
For each declaration that involved template argument deduction, the set of diagnostics that were supp...
Definition: Sema.h:9453
clang::Sema::ActOnOpenMPInclusiveClause
OMPClause * ActOnOpenMPInclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'inclusive' clause.
Definition: SemaOpenMP.cpp:23560
clang::Sema::UsesAllocatorsData::AllocatorTraits
Expr * AllocatorTraits
Allocator traits.
Definition: Sema.h:12173
clang::Sema::diagIfOpenMPDeviceCode
SemaDiagnosticBuilder diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
Definition: SemaOpenMP.cpp:2028
clang::Sema::CheckTypeTraitArity
bool CheckTypeTraitArity(unsigned Arity, SourceLocation Loc, size_t N)
Definition: SemaExprCXX.cpp:5543
clang::Sema::RequiredTemplateKind::isRequired
bool isRequired() const
Definition: Sema.h:8001
clang::Sema::AccessResult
AccessResult
Definition: Sema.h:7850
clang::Sema::getScopeForDeclContext
static Scope * getScopeForDeclContext(Scope *S, DeclContext *DC)
Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.
Definition: SemaDecl.cpp:1600
clang::Sema::AttributeCompletion::Attribute
@ Attribute
clang::Sema::SkipBodyInfo::SkipBodyInfo
SkipBodyInfo()
Definition: Sema.h:2583
clang::Sema::AlignPackIncludeState::CurrentPragmaLocation
SourceLocation CurrentPragmaLocation
Definition: Sema.h:690
clang::OMPIteratorExpr::IteratorRange
Iterator range representation begin:end[:step].
Definition: ExprOpenMP.h:278
clang::Sema::PrintPragmaAttributeInstantiationPoint
void PrintPragmaAttributeInstantiationPoint()
Definition: SemaAttr.cpp:1147
Cache
TypePropertyCache< Private > Cache
Definition: Type.cpp:3973
clang::PredefinedExpr::IdentKind
IdentKind
Definition: Expr.h:1982
clang::Sema::ActOnStartTrailingRequiresClause
void ActOnStartTrailingRequiresClause(Scope *S, Declarator &D)
Definition: SemaDeclCXX.cpp:4027
clang::Sema::DeclareImplicitDestructor
CXXDestructorDecl * DeclareImplicitDestructor(CXXRecordDecl *ClassDecl)
Declare the implicit destructor for the given class.
Definition: SemaDeclCXX.cpp:13803
clang::Sema::DiagnoseReturnInConstructorExceptionHandler
void DiagnoseReturnInConstructorExceptionHandler(CXXTryStmt *TryBlock)
Definition: SemaDeclCXX.cpp:17625
clang::Sema::ActOnFinishFullExpr
ExprResult ActOnFinishFullExpr(Expr *Expr, bool DiscardedValue)
Definition: Sema.h:6874
clang::Sema::BuildObjCTypeParamType
QualType BuildObjCTypeParamType(const ObjCTypeParamDecl *Decl, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
Build an Objective-C type parameter type.
Definition: SemaType.cpp:1039
PragmaKinds.h
clang::Sema::ActOnPragmaMSVtorDisp
void ActOnPragmaMSVtorDisp(PragmaMsStackAction Action, SourceLocation PragmaLoc, MSVtorDispMode Value)
Called on well formed #pragma vtordisp().
Definition: SemaAttr.cpp:629
clang::Sema::CheckOverrideControl
void CheckOverrideControl(NamedDecl *D)
CheckOverrideControl - Check C++11 override control semantics.
Definition: SemaDeclCXX.cpp:3104
clang::Sema::ImplicitExceptionSpecification::CalledDecl
void CalledDecl(SourceLocation CallLoc, const CXXMethodDecl *Method)
Integrate another called method into the collected data.
Definition: SemaDeclCXX.cpp:175
clang::Sema::CodeSynthesisContext::template_arguments
ArrayRef< TemplateArgument > template_arguments() const
Definition: Sema.h:9330
clang::Sema::DisableTypoCorrection
bool DisableTypoCorrection
Tracks whether we are in a context where typo correction is disabled.
Definition: Sema.h:9794
false
#define false
Definition: stdbool.h:22
clang::Sema::TDK_ConstraintsNotSatisfied
@ TDK_ConstraintsNotSatisfied
The deduced arguments did not satisfy the constraints associated with the template.
Definition: Sema.h:9001
clang::Sema::IfExistsResult
IfExistsResult
Describes the result of an "if-exists" condition check.
Definition: Sema.h:6004
clang::Sema::getTypoExprState
const TypoExprState & getTypoExprState(TypoExpr *TE) const
Definition: SemaLookup.cpp:5863
clang::StandardConversionSequence
StandardConversionSequence - represents a standard conversion sequence (C++ 13.3.3....
Definition: Overload.h:258
clang::Sema::createImplicitModuleImportForErrorRecovery
void createImplicitModuleImportForErrorRecovery(SourceLocation Loc, Module *Mod)
Create an implicit import of the given module at the given source location, for error recovery,...
Definition: SemaModule.cpp:718
clang::Sema::MarkBaseAndMemberDestructorsReferenced
void MarkBaseAndMemberDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record)
MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of...
Definition: SemaDeclCXX.cpp:5651
clang::Sema::getStdBadAlloc
CXXRecordDecl * getStdBadAlloc() const
Definition: SemaDeclCXX.cpp:11376
clang::Sema::CheckObjCARCUnavailableWeakConversion
bool CheckObjCARCUnavailableWeakConversion(QualType castType, QualType ExprType)
Definition: SemaExprObjC.cpp:4578
clang::Sema::OOK_Macro
@ OOK_Macro
Definition: Sema.h:3321
clang::Sema::ActOnPragmaMSStruct
void ActOnPragmaMSStruct(PragmaMSStructKind Kind)
ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
Definition: SemaAttr.cpp:504
ExternalSemaSource.h
clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers
TypeResult actOnObjCTypeArgsAndProtocolQualifiers(Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
Build a specialized and/or protocol-qualified Objective-C type.
Definition: SemaType.cpp:1132
clang::Sema::ActOnCoawaitExpr
ExprResult ActOnCoawaitExpr(Scope *S, SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:790
clang::Sema::PragmaAttributeEntry
This an attribute introduced by #pragma clang attribute.
Definition: Sema.h:742
clang::Sema::CUDASetLambdaAttrs
void CUDASetLambdaAttrs(CXXMethodDecl *Method)
Set device or host device attributes on the given lambda operator() method.
Definition: SemaCUDA.cpp:895
clang::Sema::ActOnExprStmtError
StmtResult ActOnExprStmtError()
Definition: SemaStmt.cpp:63
clang::Sema::SubstStmt
StmtResult SubstStmt(Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3900
clang::Sema::FAPK_VAList
@ FAPK_VAList
Definition: Sema.h:13405
clang::Sema::BuildDelegatingInitializer
MemInitResult BuildDelegatingInitializer(TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
Definition: SemaDeclCXX.cpp:4511
clang::Sema::UnparsedDefaultArgInstantiationsMap
llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > UnparsedDefaultArgInstantiationsMap
Definition: Sema.h:1477
clang::DeclResult
ActionResult< Decl * > DeclResult
Definition: Ownership.h:268
clang::Sema::ActOnFinishCXXMemberDecls
void ActOnFinishCXXMemberDecls()
Perform any semantic analysis which needs to be delayed until all pending class member declarations h...
Definition: SemaDeclCXX.cpp:13933
clang::PartialDiagnostic::Emit
void Emit(const DiagnosticBuilder &DB) const
Definition: PartialDiagnostic.h:144
clang::concepts::TypeRequirement
A requires-expression requirement which queries the existence of a type name or type template special...
Definition: ExprConcepts.h:200
clang::FileNullability
Describes whether we've seen any nullability information for the given file.
Definition: Sema.h:249
clang::Sema::FST_Printf
@ FST_Printf
Definition: Sema.h:13567
clang::Sema::ExtParameterInfoBuilder
A helper class for building up ExtParameterInfos.
Definition: Sema.h:9907
clang::Sema::PerformCopyInitialization
ExprResult PerformCopyInitialization(const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
Definition: SemaInit.cpp:10246
clang::Sema::IdResolver
IdentifierResolver IdResolver
Definition: Sema.h:1128
clang::Sema::CheckSpecializationInstantiationRedecl
bool CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew)
Diagnose cases where we have an explicit template specialization before/after an explicit template in...
Definition: SemaTemplate.cpp:9083
clang::Sema::isInOpenMPDeclareTargetContext
bool isInOpenMPDeclareTargetContext() const
Return true inside OpenMP declare target region.
Definition: Sema.h:11277
clang::ActionResult::get
PtrTy get() const
Definition: Ownership.h:169
clang::Sema::ActOnTypeTrait
ExprResult ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
Parsed one of the type trait support pseudo-functions.
Definition: SemaExprCXX.cpp:5587
clang::Sema::ActOnOpenMPAcquireClause
OMPClause * ActOnOpenMPAcquireClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acquire' clause.
Definition: SemaOpenMP.cpp:17456
clang::Sema::ActOnCompoundRequirement
concepts::Requirement * ActOnCompoundRequirement(Expr *E, SourceLocation NoexceptLoc)
Definition: SemaExprCXX.cpp:8966
clang::threadSafety::BeforeSet
Definition: ThreadSafety.cpp:277
clang::Sema::SubstAutoTypeDependent
QualType SubstAutoTypeDependent(QualType TypeWithAuto)
Definition: SemaTemplateDeduction.cpp:4885
clang::Sema::hasAcceptableDefinition
bool hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, AcceptableKind Kind, bool OnlyNeedComplete=false)
Definition: SemaType.cpp:8751
clang::Sema::PushCapturedRegionScope
void PushCapturedRegionScope(Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K, unsigned OpenMPCaptureLevel=0)
Definition: Sema.cpp:2674
clang::Sema::BuildCoyieldExpr
ExprResult BuildCoyieldExpr(SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:936
clang::Sema::MakeFullExpr
FullExprArg MakeFullExpr(Expr *Arg)
Definition: Sema.h:5004
clang::Sema::LateInstantiatedAttribute
Definition: Sema.h:10057
clang::ClassTemplateDecl
Declaration of a class template.
Definition: DeclTemplate.h:2270
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:703
clang::TNK_Type_template
@ TNK_Type_template
The name refers to a template whose specialization produces a type.
Definition: TemplateKinds.h:30
clang::Sema::ExpressionEvaluationContextRecord::ParentCleanup
CleanupInfo ParentCleanup
Whether the enclosing context needed a cleanup.
Definition: Sema.h:1285
clang::Sema::BuildFunctionType
QualType BuildFunctionType(QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
Build a function type.
Definition: SemaType.cpp:2972
clang::ast_matchers::castExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
Definition: ASTMatchersInternal.cpp:977
clang::ASTContext::IntTy
CanQualType IntTy
Definition: ASTContext.h:1087
clang::Sema::tryToRecoverWithCall
bool tryToRecoverWithCall(ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr)
Try to recover by turning the given expression into a call.
Definition: Sema.cpp:2617
clang::Sema::PopParsingClass
void PopParsingClass(ParsingClassState state)
Definition: Sema.h:5341
clang::Sema::ProcessStmtAttributes
void ProcessStmtAttributes(Stmt *Stmt, const ParsedAttributes &InAttrs, SmallVectorImpl< const Attr * > &OutAttrs)
Process the attributes before creating an attributed statement.
Definition: SemaStmtAttr.cpp:503
clang::Sema::CheckFunctionTemplateSpecialization
bool CheckFunctionTemplateSpecialization(FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend=false)
Perform semantic analysis for the given function template specialization.
Definition: SemaTemplate.cpp:9327
clang::Sema::getMismatchingDeleteExpressions
const llvm::MapVector< FieldDecl *, DeleteLocs > & getMismatchingDeleteExpressions() const
Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit.
Definition: Sema.cpp:2693
clang::Sema::PragmaStack::CurrentPragmaLocation
SourceLocation CurrentPragmaLocation
Definition: Sema.h:672
clang::Sema::ActOnDelayedCXXMethodParameter
void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param)
ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration.
Definition: SemaDeclCXX.cpp:10476
clang::Sema::NC_TypeTemplate
@ NC_TypeTemplate
The name was classified as a template whose specializations are types.
Definition: Sema.h:2655
clang::Sema::TDK_InvalidExplicitArguments
@ TDK_InvalidExplicitArguments
The explicitly-specified template arguments were not valid template arguments for the given template.
Definition: Sema.h:8996
clang::Sema::completeExprArrayBound
void completeExprArrayBound(Expr *E)
Definition: SemaType.cpp:8619
clang::Sema::ActOnExpressionTrait
ExprResult ActOnExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions.
Definition: SemaExprCXX.cpp:5902
clang::Sema::MSPointerToMemberRepresentationMethod
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
Controls member pointer representation format under the MS ABI.
Definition: Sema.h:435
clang::Sema::ForExternalRedeclaration
@ ForExternalRedeclaration
The lookup results will be used for redeclaration of a name with external linkage; non-visible lookup...
Definition: Sema.h:4348
clang::TemplateName
Represents a C++ template name within the type system.
Definition: TemplateName.h:202
clang::Sema::CodeSynthesisContext::DeclaringSpecialMember
@ DeclaringSpecialMember
We are declaring an implicit special member function.
Definition: Sema.h:9245
clang::Sema::RedeclarationKind
RedeclarationKind
Specifies whether (or how) name lookup is being performed for a redeclaration (vs.
Definition: Sema.h:4338
clang::Sema::UsesAllocatorsData
Data for list of allocators.
Definition: Sema.h:12169
clang::Sema::PragmaAttributeEntry::IsUsed
bool IsUsed
Definition: Sema.h:746
clang::ParenExpr
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:2124
clang::Sema::CCK_CStyleCast
@ CCK_CStyleCast
A C-style cast.
Definition: Sema.h:12205
clang::Sema::ActOnOpenMPTaskyieldDirective
StmtResult ActOnOpenMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskyield'.
Definition: SemaOpenMP.cpp:11105
clang::Sema::PragmaAttributeGroup::Namespace
const IdentifierInfo * Namespace
The namespace of this push group.
Definition: Sema.h:754
clang::Sema::LateParsedTemplateMapT
llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate > > LateParsedTemplateMapT
Definition: Sema.h:919
clang::Sema::ActOnCharacterConstant
ExprResult ActOnCharacterConstant(const Token &Tok, Scope *UDLScope=nullptr)
Definition: SemaExpr.cpp:3622
clang::Sema::BuildObjCNumericLiteral
ExprResult BuildObjCNumericLiteral(SourceLocation AtLoc, Expr *Number)
BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.
Definition: SemaExprObjC.cpp:317
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:4023
clang::Sema::AlignPackInfo::IsAlignAttr
bool IsAlignAttr() const
Definition: Sema.h:546
clang::Sema::CodeCompleteObjCClassMessage
void CodeCompleteObjCClassMessage(Scope *S, ParsedType Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, bool IsSuper=false)
Definition: SemaCodeComplete.cpp:8100
clang::Sema::SatisfactionStackResetRAII::SatisfactionStackResetRAII
SatisfactionStackResetRAII(Sema &S)
Definition: Sema.h:7317
clang::Sema::CheckShadowingDeclModification
void CheckShadowingDeclModification(Expr *E, SourceLocation Loc)
Warn if 'E', which is an expression that is about to be modified, refers to a shadowing declaration.
Definition: SemaDecl.cpp:8314
clang::Sema::DeclareImplicitEqualityComparison
void DeclareImplicitEqualityComparison(CXXRecordDecl *RD, FunctionDecl *Spaceship)
Definition: SemaDeclCXX.cpp:8844
clang::Sema::hasVisibleDeclaration
bool hasVisibleDeclaration(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine whether any declaration of an entity is visible.
Definition: Sema.h:2382
clang::ObjCImplDecl
Definition: DeclObjC.h:2457
clang::Sema::WarnConflictingTypedMethods
void WarnConflictingTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
Definition: SemaDeclObjC.cpp:2578
clang::Sema::inferObjCARCLifetime
bool inferObjCARCLifetime(ValueDecl *decl)
Definition: SemaDecl.cpp:6826
clang::Sema::ActOnOpenMPSingleExprWithArgClause
OMPClause * ActOnOpenMPSingleExprWithArgClause(OpenMPClauseKind Kind, ArrayRef< unsigned > Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, ArrayRef< SourceLocation > ArgumentsLoc, SourceLocation DelimLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:17000
clang::Sema::TemplateNameKindForDiagnostics::FunctionTemplate
@ FunctionTemplate
clang::Sema::PSK_DataSeg
@ PSK_DataSeg
Definition: Sema.h:10632
clang::Sema::ConstraintEvalRAII::~ConstraintEvalRAII
~ConstraintEvalRAII()
Definition: Sema.h:9985
clang::Sema::getPrintable
static const char * getPrintable(const char *S)
Definition: Sema.h:2182
clang::Sema::CheckEnableIf
EnableIfAttr * CheckEnableIf(FunctionDecl *Function, SourceLocation CallLoc, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
Check the enable_if expressions on the given function.
Definition: SemaOverload.cpp:6824
clang::Sema::CompatiblePointerDiscardsQualifiers
@ CompatiblePointerDiscardsQualifiers
CompatiblePointerDiscardsQualifiers - The assignment discards c/v/r qualifiers, which we accept as an...
Definition: Sema.h:12396
clang::Sema::ParseObjCSelectorExpression
ExprResult ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors)
ParseObjCSelectorExpression - Build selector expression for @selector.
Definition: SemaExprObjC.cpp:1291
clang::Sema::shouldIgnoreInHostDeviceCheck
bool shouldIgnoreInHostDeviceCheck(FunctionDecl *Callee)
Definition: SemaDecl.cpp:19946
clang::Expr::getExprLoc
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
Definition: Expr.cpp:330
clang::Sema::ProcessDeclAttributeList
void ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options=ProcessDeclAttributeOptions())
ProcessDeclAttributeList - Apply all the decl attributes in the specified attribute list to the speci...
Definition: SemaDeclAttr.cpp:9364
clang::Sema::CheckUsingDeclQualifier
bool CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R=nullptr, const UsingDecl *UD=nullptr)
Checks that the given nested-name qualifier used in a using decl in the current context is appropriat...
Definition: SemaDeclCXX.cpp:12829
clang::Sema::ProcessDeclAttributeOptions::ProcessDeclAttributeOptions
ProcessDeclAttributeOptions()
Definition: Sema.h:4641
clang::Sema::CheckTemplatePartialSpecialization
void CheckTemplatePartialSpecialization(ClassTemplatePartialSpecializationDecl *Partial)
Definition: SemaTemplate.cpp:4434
clang::Sema::getCurrentClass
CXXRecordDecl * getCurrentClass(Scope *S, const CXXScopeSpec *SS)
Get the class that is directly named by the current context.
Definition: SemaDeclCXX.cpp:2446
clang::Sema::getPrintable
static bool getPrintable(bool B)
Definition: Sema.h:2181
clang::TemplateDecl
The base class of all kinds of template declarations (e.g., class, function, etc.).
Definition: DeclTemplate.h:407
clang::Sema::PerformMoveOrCopyInitialization
ExprResult PerformMoveOrCopyInitialization(const InitializedEntity &Entity, const NamedReturnInfo &NRInfo, Expr *Value, bool SupressSimplerImplicitMoves=false)
Perform the initialization of a potentially-movable value, which is the result of return value.
Definition: SemaStmt.cpp:3528
clang::Sema::ActOnTypeConstraint
bool ActOnTypeConstraint(const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
Definition: SemaTemplate.cpp:1110
clang::Sema::SubstAutoTypeSourceInfoDependent
TypeSourceInfo * SubstAutoTypeSourceInfoDependent(TypeSourceInfo *TypeWithAuto)
Definition: SemaTemplateDeduction.cpp:4891
clang::VarTemplatePartialSpecializationDecl
Definition: DeclTemplate.h:2957
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::getEmptyKey
static FunctionDeclAndLoc getEmptyKey()
Definition: Sema.h:13993
clang::Sema::CheckPointerToMemberOperands
QualType CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect)
Definition: SemaExprCXX.cpp:5942
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition: ExprCXX.h:2473
clang::Sema::CheckNonDependentConversions
bool CheckNonDependentConversions(FunctionTemplateDecl *FunctionTemplate, ArrayRef< QualType > ParamTypes, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, ConversionSequenceList &Conversions, bool SuppressUserConversions, CXXRecordDecl *ActingContext=nullptr, QualType ObjectType=QualType(), Expr::Classification ObjectClassification={}, OverloadCandidateParamOrder PO={})
Check that implicit conversion sequences can be formed for each argument whose corresponding paramete...
Definition: SemaOverload.cpp:7349
clang::Sema::isInOpenMPTargetExecutionDirective
bool isInOpenMPTargetExecutionDirective() const
Return true inside OpenMP target region.
Definition: SemaOpenMP.cpp:2293
clang::Sema::ActOnCXXNestedNameSpecifierDecltype
bool ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc)
Definition: SemaCXXScopeSpec.cpp:867
clang::Sema::isKnownName
bool isKnownName(StringRef name)
Definition: SemaExprObjC.cpp:3736
TypeOrdering.h
clang::Sema::adjustMemberFunctionCC
void adjustMemberFunctionCC(QualType &T, bool IsStatic, bool IsCtorOrDtor, SourceLocation Loc)
Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly.
Definition: SemaType.cpp:7932
clang::Sema::DiagnoseNonDefaultPragmaAlignPack
void DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc)
Definition: SemaAttr.cpp:438
clang::Sema::BuildCaptureInit
ExprResult BuildCaptureInit(const sema::Capture &Capture, SourceLocation ImplicitCaptureLoc, bool IsOpenMPMapping=false)
Initialize the given capture with a suitable expression.
Definition: SemaLambda.cpp:1610
clang::Sema::ActOnFinishDelayedAttribute
void ActOnFinishDelayedAttribute(Scope *S, Decl *D, ParsedAttributes &Attrs)
ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is...
Definition: SemaDecl.cpp:15844
Begin
SourceLocation Begin
Definition: USRLocFinder.cpp:165
clang::Sema::Private
@ Private
The private module fragment, between 'module :private;' and the end of the translation unit.
Definition: Sema.h:1945
clang::Sema::CreateUnresolvedLookupExpr
ExprResult CreateUnresolvedLookupExpr(CXXRecordDecl *NamingClass, NestedNameSpecifierLoc NNSLoc, DeclarationNameInfo DNI, const UnresolvedSetImpl &Fns, bool PerformADL=true)
Definition: SemaOverload.cpp:13530
llvm::ArrayRef
Definition: LLVM.h:31
clang::Sema::ACK_Conditional
@ ACK_Conditional
A conditional (?:) operator.
Definition: Sema.h:12339
clang::Sema::InstantiateMemInitializers
void InstantiateMemInitializers(CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiateDecl.cpp:5623
clang::Sema::setTagNameForLinkagePurposes
void setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD)
Definition: SemaDecl.cpp:4962
clang::Sema::AR_inaccessible
@ AR_inaccessible
Definition: Sema.h:7852
clang::Sema::NTK_NonUnion
@ NTK_NonUnion
Definition: Sema.h:3289
clang::OpenMPDefaultmapClauseModifier
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
Definition: OpenMPKinds.h:118
Value
Value
Definition: UninitializedValues.cpp:102
clang::Sema::ProduceCallSignatureHelp
QualType ProduceCallSignatureHelp(Expr *Fn, ArrayRef< Expr * > Args, SourceLocation OpenParLoc)
Determines the preferred type of the current function argument, by examining the signatures of all po...
Definition: SemaCodeComplete.cpp:6087
clang::Sema::CheckExceptionSpecSubset
bool CheckExceptionSpecSubset(const PartialDiagnostic &DiagID, const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const PartialDiagnostic &NoThrowDiagID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subs...
Definition: SemaExceptionSpec.cpp:766
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::Sema::CXXInvalid
@ CXXInvalid
Definition: Sema.h:1552
clang::Sema::NoFold
@ NoFold
Definition: Sema.h:12907
clang::AttributeCommonInfo
Definition: AttributeCommonInfo.h:22
clang::Sema::AA_Passing_CFAudited
@ AA_Passing_CFAudited
Definition: Sema.h:3715
clang::Sema::CheckTemplateParameterList
bool CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody=nullptr)
Checks the validity of a template parameter list, possibly considering the template parameter list fr...
Definition: SemaTemplate.cpp:2773
clang::Sema::PopFunctionScopeInfo
PoppedFunctionScopePtr PopFunctionScopeInfo(const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, QualType BlockType=QualType())
Pop a function (or block or lambda or captured region) scope from the stack.
Definition: Sema.cpp:2234
clang::Sema::AddSurrogateCandidate
void AddSurrogateCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a fun...
Definition: SemaOverload.cpp:7713
Scope.h
clang::Sema::ConditionResult::get
std::pair< VarDecl *, Expr * > get() const
Definition: Sema.h:12813
clang::Sema::AssociatedClassSet
llvm::SmallSetVector< CXXRecordDecl *, 16 > AssociatedClassSet
Definition: Sema.h:3971
clang::Sema::ProcessDeclAttributes
void ProcessDeclAttributes(Scope *S, Decl *D, const Declarator &PD)
ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in it, apply them to D.
Definition: SemaDeclAttr.cpp:9601
clang::ObjCPropertyQueryKind
ObjCPropertyQueryKind
Definition: DeclObjC.h:717
clang::Sema::getLocationOfStringLiteralByte
SourceLocation getLocationOfStringLiteralByte(const StringLiteral *SL, unsigned ByteNo) const
Definition: SemaChecking.cpp:105
clang::Sema::ActOnFinishOfCompoundStmt
void ActOnFinishOfCompoundStmt()
Definition: SemaStmt.cpp:401
clang::Sema::ActOnIfStmt
StmtResult ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
Definition: SemaStmt.cpp:878
clang::EnterExpressionEvaluationContext
RAII object that enters a new expression evaluation context.
Definition: Sema.h:13916
clang::Sema::PerformDependentDiagnostics
void PerformDependentDiagnostics(const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiateDecl.cpp:6401
clang::Sema::PragmaAttributeStack
SmallVector< PragmaAttributeGroup, 2 > PragmaAttributeStack
Definition: Sema.h:758
clang::Sema::BuildClassMessage
ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C class message expression.
Definition: SemaExprObjC.cpp:2604
clang::DeclaratorDecl
Represents a ValueDecl that came out of a declarator.
Definition: Decl.h:767
clang::Sema::BuildVariableInstantiation
void BuildVariableInstantiation(VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false, VarTemplateSpecializationDecl *PrevVTSD=nullptr)
BuildVariableInstantiation - Used after a new variable has been created.
Definition: SemaTemplateInstantiateDecl.cpp:5192
clang::Sema::CodeCompleteTag
void CodeCompleteTag(Scope *S, unsigned TagSpec)
Definition: SemaCodeComplete.cpp:5795
clang::Sema::ActOnStartStmtExpr
void ActOnStartStmtExpr()
Definition: SemaExpr.cpp:16122
clang::TypeLoc
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:58
clang::Sema::hasStructuralCompatLayout
bool hasStructuralCompatLayout(Decl *D, Decl *Suggested)
Determine if D and Suggested have a structurally compatible layout as described in C11 6....
Definition: SemaType.cpp:8736
clang::Sema::ActOnPragmaMSComment
void ActOnPragmaMSComment(SourceLocation CommentLoc, PragmaMSCommentKind Kind, StringRef Arg)
ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").
Definition: SemaAttr.cpp:508
clang::Sema::checkThisInStaticMemberFunctionType
bool checkThisInStaticMemberFunctionType(CXXMethodDecl *Method)
Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-...
Definition: SemaDeclCXX.cpp:18271
clang::Sema::CreateOverloadedUnaryOp
ExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *input, bool RequiresADL=true)
Create a unary operation that may resolve to an overloaded operator.
Definition: SemaOverload.cpp:13556
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:729
clang::Sema::CheckDestructorDeclarator
QualType CheckDestructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor d...
Definition: SemaDeclCXX.cpp:10693
clang::Sema::CheckSizelessVectorOperands
QualType CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind)
Definition: SemaExpr.cpp:10876
clang::FunctionType::ExtParameterInfo
Interesting information about a specific parameter that can't simply be reflected in parameter's type...
Definition: Type.h:3708
clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope
TentativeAnalysisScope(Sema &SemaRef)
Definition: Sema.h:9778
clang::Sema::ActOnOpenMPLoopInitialization
void ActOnOpenMPLoopInitialization(SourceLocation ForLoc, Stmt *Init)
Check if the current region is an OpenMP loop region and if it is, mark loop control variable,...
Definition: SemaOpenMP.cpp:9098
clang::Sema::findLocallyScopedExternCDecl
NamedDecl * findLocallyScopedExternCDecl(DeclarationName Name)
Look for a locally scoped extern "C" declaration by the given name.
Definition: SemaDecl.cpp:6612
clang::Sema::ActOnExceptionDeclarator
Decl * ActOnExceptionDeclarator(Scope *S, Declarator &D)
ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.
Definition: SemaDeclCXX.cpp:16566
clang::Sema::ActOnOpenMPTeamsDirective
StmtResult ActOnOpenMPTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp teams' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13282
clang::Sema::NameClassification::NonType
static NameClassification NonType(NamedDecl *D)
Definition: Sema.h:2696
clang::Sema::ActOnTypedefDeclarator
NamedDecl * ActOnTypedefDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
Definition: SemaDecl.cpp:6637
clang::Sema::MarkCaptureUsedInEnclosingContext
void MarkCaptureUsedInEnclosingContext(ValueDecl *Capture, SourceLocation Loc, unsigned CapturingScopeIndex)
Definition: SemaExpr.cpp:18543
clang::Sema::mergeEnforceTCBAttr
EnforceTCBAttr * mergeEnforceTCBAttr(Decl *D, const EnforceTCBAttr &AL)
Definition: SemaDeclAttr.cpp:8531
clang::MakeDeductionFailureInfo
DeductionFailureInfo MakeDeductionFailureInfo(ASTContext &Context, Sema::TemplateDeductionResult TDK, sema::TemplateDeductionInfo &Info)
Convert from Sema's representation of template deduction information to the form used in overload-can...
Definition: SemaOverload.cpp:616
clang::Sema::FunctionScopeRAII::Active
bool Active
Definition: Sema.h:5048
clang::Sema::isLibstdcxxEagerExceptionSpecHack
bool isLibstdcxxEagerExceptionSpecHack(const Declarator &D)
Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification ...
Definition: SemaExceptionSpec.cpp:45
clang::Sema::ActOnDeclarator
Decl * ActOnDeclarator(Scope *S, Declarator &D)
Definition: SemaDecl.cpp:6072
clang::Sema::SpecialMemberDecl
llvm::PointerIntPair< CXXRecordDecl *, 3, CXXSpecialMember > SpecialMemberDecl
Definition: Sema.h:1556
clang::Sema::VerifyICEDiagnoser::Suppress
bool Suppress
Definition: Sema.h:12894
clang::Sema::TDK_MiscellaneousDeductionFailure
@ TDK_MiscellaneousDeductionFailure
Deduction failed; that's all we know.
Definition: Sema.h:9003
clang::Sema::ActOnInstanceMessage
ExprResult ActOnInstanceMessage(Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
Definition: SemaExprObjC.cpp:3410
clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective
StmtResult ActOnOpenMPTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:14217
clang::Sema::BuildTypeRequirement
concepts::TypeRequirement * BuildTypeRequirement(TypeSourceInfo *Type)
Definition: SemaExprCXX.cpp:9067
clang::Sema::Consumer
ASTConsumer & Consumer
Definition: Sema.h:410
clang::Sema::AddBuiltinOperatorCandidates
void AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (...
Definition: SemaOverload.cpp:9363
clang::Sema::PSK_BSSSeg
@ PSK_BSSSeg
Definition: Sema.h:10633
clang::Sema::CodeSynthesisContext::CallArgs
const Expr *const * CallArgs
The list of argument expressions in a synthesized call.
Definition: Sema.h:9314
clang::Sema::GlobalEagerInstantiationScope::~GlobalEagerInstantiationScope
~GlobalEagerInstantiationScope()
Definition: Sema.h:9846
clang::Sema::ActOnOpenMPOrderClause
OMPClause * ActOnOpenMPOrderClause(OpenMPOrderClauseModifier Modifier, OpenMPOrderClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
Called on well-formed 'order' clause.
Definition: SemaOpenMP.cpp:16889
clang::OpenMPAtomicDefaultMemOrderClauseKind
OpenMPAtomicDefaultMemOrderClauseKind
OpenMP attributes for 'atomic_default_mem_order' clause.
Definition: OpenMPKinds.h:127
clang::Sema::DefaultLvalueConversion
ExprResult DefaultLvalueConversion(Expr *E)
Definition: SemaExpr.cpp:630
clang::Sema::TemplateNameKindForDiagnostics::AliasTemplate
@ AliasTemplate
clang::ArraySubscriptExpr
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2657
clang::DarwinSDKInfo
The information about the darwin SDK that was used during this compilation.
Definition: DarwinSDKInfo.h:29
clang::Sema::EndOpenMPDSABlock
void EndOpenMPDSABlock(Stmt *CurDirective)
Called on end of data sharing attribute block.
Definition: SemaOpenMP.cpp:2850
clang::TemplatePartialOrderingContext
Definition: Template.h:285
clang::Sema::ActOnOpenMPDependClause
OMPClause * ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, Expr *DepModifier, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depend' clause.
Definition: SemaOpenMP.cpp:20512
clang::Sema::NameClassification::DependentNonType
static NameClassification DependentNonType()
Definition: Sema.h:2706
clang::Sema::getConstructorName
ParsedType getConstructorName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, bool EnteringContext)
Definition: SemaExprCXX.cpp:89
clang::Sema::ActOnOpenMPLastprivateClause
OMPClause * ActOnOpenMPLastprivateClause(ArrayRef< Expr * > VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'lastprivate' clause.
Definition: SemaOpenMP.cpp:18419
clang::Sema::ActOnFinishDelayedCXXMethodDeclaration
void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration f...
Definition: SemaDeclCXX.cpp:10493
clang::Sema::getFullyPackExpandedSize
std::optional< unsigned > getFullyPackExpandedSize(TemplateArgument Arg)
Given a template argument that contains an unexpanded parameter pack, but which has already been subs...
Definition: SemaTemplateVariadic.cpp:1122
clang::Sema::BuildNestedRequirement
concepts::NestedRequirement * BuildNestedRequirement(Expr *E)
Definition: SemaExprCXX.cpp:9082
clang::Sema::ActOnComment
void ActOnComment(SourceRange Comment)
Definition: Sema.cpp:2380
clang::Sema::ActOnForwardProtocolDeclaration
DeclGroupPtrTy ActOnForwardProtocolDeclaration(SourceLocation AtProtoclLoc, ArrayRef< IdentifierLocPair > IdentList, const ParsedAttributesView &attrList)
ActOnForwardProtocolDeclaration - Handle @protocol foo;.
Definition: SemaDeclObjC.cpp:1790
clang::Sema::LookupInlineAsmField
bool LookupInlineAsmField(StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
Definition: SemaStmtAsm.cpp:821
BitmaskEnum.h
clang::Sema::isEmptyCudaConstructor
bool isEmptyCudaConstructor(SourceLocation Loc, CXXConstructorDecl *CD)
Definition: SemaCUDA.cpp:461
clang::Sema::NSStringPointer
QualType NSStringPointer
Pointer to NSString type (NSString *).
Definition: Sema.h:1194
clang::Sema::ActOnOpenMPReductionClause
OMPClause * ActOnOpenMPReductionClause(ArrayRef< Expr * > VarList, OpenMPReductionClauseModifier Modifier, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
Called on well-formed 'reduction' clause.
Definition: SemaOpenMP.cpp:19803
clang::Sema::popCodeSynthesisContext
void popCodeSynthesisContext()
Definition: SemaTemplateInstantiate.cpp:602
clang::Sema::SemaDiagnosticBuilder::K_ImmediateWithCallStack
@ K_ImmediateWithCallStack
Emit the diagnostic immediately, and, if it's a warning or error, also emit a call stack showing how ...
Definition: Sema.h:1780
clang::Sema::AFS_Class
@ AFS_Class
Only look for allocation functions in the scope of the allocated class.
Definition: Sema.h:6753
clang::Sema::FRS_NoViableFunction
@ FRS_NoViableFunction
Definition: Sema.h:4171
clang::Sema
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:358
clang::Sema::addInitCapture
void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var, bool isReferenceType)
Add an init-capture to a lambda scope.
Definition: SemaLambda.cpp:892
clang::Sema::ActOnObjCInstanceType
ParsedType ActOnObjCInstanceType(SourceLocation Loc)
The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration...
Definition: SemaType.cpp:6622
clang::Sema::ActOnOpenMPIdExpression
ExprResult ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind)
Called on correct id-expression from the '#pragma omp threadprivate'.
Definition: SemaOpenMP.cpp:3026
clang::ActionResult::isInvalid
bool isInvalid() const
Definition: Ownership.h:165
clang::Sema::DiagnosePropertyMismatch
void DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a vari...
Definition: SemaObjCProperty.cpp:1635
clang::Sema::ProcessPragmaWeak
void ProcessPragmaWeak(Scope *S, Decl *D)
Definition: SemaDeclAttr.cpp:9571
clang::Sema::hasAcceptableDefinition
bool hasAcceptableDefinition(NamedDecl *D, AcceptableKind Kind)
Definition: Sema.h:2426
clang::Sema::VerifyBitField
ExprResult VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth)
VerifyBitField - verifies that a bit field expression is an ICE and has the correct width,...
Definition: SemaDecl.cpp:17731
clang::Sema::SemaDiagnosticBuilder::AddFixItHint
void AddFixItHint(const FixItHint &Hint) const
Definition: Sema.h:1840
clang::Sema::NC_Type
@ NC_Type
The name was classified as a type.
Definition: Sema.h:2636
clang::Sema::LateInstantiatedAttribute::Scope
LocalInstantiationScope * Scope
Definition: Sema.h:10059
clang::Sema::CheckExtraCXXDefaultArguments
void CheckExtraCXXDefaultArguments(Declarator &D)
CheckExtraCXXDefaultArguments - Check for any extra default arguments in the declarator,...
Definition: SemaDeclCXX.cpp:407
clang::Sema::TypeDiagnoser::diagnose
virtual void diagnose(Sema &S, SourceLocation Loc, QualType T)=0
clang::Sema::FunctionEmissionStatus::TemplateDiscarded
@ TemplateDiscarded
clang::Sema::getStdAlignValT
EnumDecl * getStdAlignValT() const
Definition: SemaDeclCXX.cpp:11381
clang::Sema::IvarBacksCurrentMethodAccessor
bool IvarBacksCurrentMethodAccessor(ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Meth...
Definition: SemaObjCProperty.cpp:1836
clang::Sema::DeclareImplicitCopyAssignment
CXXMethodDecl * DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit copy assignment operator for the given class.
Definition: SemaDeclCXX.cpp:14433
clang::Sema::PragmaAttributeGroup::Entries
SmallVector< PragmaAttributeEntry, 2 > Entries
Definition: Sema.h:755
clang::Sema::BuildArrayType
QualType BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
Build an array type.
Definition: SemaType.cpp:2437
clang::Sema::BuildExpressionTrait
ExprResult BuildExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
Definition: SemaExprCXX.cpp:5924
clang::Sema::CodeCompleteUsingDirective
void CodeCompleteUsingDirective(Scope *S)
Definition: SemaCodeComplete.cpp:6675
clang::CodeCompleteConsumer
Abstract interface for a consumer of code-completion information.
Definition: CodeCompleteConsumer.h:1009
clang::Sema::mergeErrorAttr
ErrorAttr * mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic)
Definition: SemaDeclAttr.cpp:3874
clang::Sema::TentativeDefinitionsType
LazyVector< VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > TentativeDefinitionsType
Definition: Sema.h:879
clang::Sema::ActOnConditionalOp
ExprResult ActOnConditionalOp(SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
ActOnConditionalOp - Parse a ?: operation.
Definition: SemaExpr.cpp:9358
clang::Sema::ActOnOpenMPTargetEnterDataDirective
StmtResult ActOnOpenMPTargetEnterDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target enter data' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13170
clang::Sema::ActOnOpenMPDistScheduleClause
OMPClause * ActOnOpenMPDistScheduleClause(OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'dist_schedule' clause.
Definition: SemaOpenMP.cpp:22704
clang::Sema::resolveAndFixAddressOfSingleOverloadCandidate
bool resolveAndFixAddressOfSingleOverloadCandidate(ExprResult &SrcExpr, bool DoFunctionPointerConversion=false)
Given an overloaded function, tries to turn it into a non-overloaded function reference using resolve...
Definition: SemaOverload.cpp:12725
clang::Sema::InstantiateDefaultCtorDefaultArgs
void InstantiateDefaultCtorDefaultArgs(CXXConstructorDecl *Ctor)
In the MS ABI, we need to instantiate default arguments of dllexported default constructors along wit...
Definition: SemaTemplateInstantiateDecl.cpp:841
clang::Sema::TentativeAnalysisScope::~TentativeAnalysisScope
~TentativeAnalysisScope()
Definition: Sema.h:9783
clang::Sema::handlerCanCatch
bool handlerCanCatch(QualType HandlerType, QualType ExceptionType)
Definition: SemaExceptionSpec.cpp:679
clang::Sema::CodeSynthesisContext::ConstraintsCheck
@ ConstraintsCheck
Definition: Sema.h:9259
clang::Sema::SemaDiagnosticBuilder::ExprError
friend ExprResult ExprError(const SemaDiagnosticBuilder &)
Definition: Sema.h:1847
clang::Sema::SubstInitializer
ExprResult SubstInitializer(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
Definition: SemaTemplateInstantiate.cpp:3943
clang::LazyVector
Represents a lazily-loaded vector of data.
Definition: ExternalASTSource.h:493
clang::Sema::ActOnOpenMPIsDevicePtrClause
OMPClause * ActOnOpenMPIsDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'is_device_ptr' clause.
Definition: SemaOpenMP.cpp:23289
clang::Sema::CCEKind
CCEKind
Contexts in which a converted constant expression is required.
Definition: Sema.h:3851
clang::Sema::diagnoseNullableToNonnullConversion
void diagnoseNullableToNonnullConversion(QualType DstType, QualType SrcType, SourceLocation Loc)
Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one.
Definition: Sema.cpp:565
clang::Sema::IsIntegralPromotion
bool IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType)
IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-a...
Definition: SemaOverload.cpp:2170
clang::Sema::NameClassification::VarTemplate
static NameClassification VarTemplate(TemplateName Name)
Definition: Sema.h:2716
clang::Sema::LookupRedeclarationWithLinkage
@ LookupRedeclarationWithLinkage
Look up an ordinary name that is going to be redeclared as a name with linkage.
Definition: Sema.h:4320
clang::Sema::RequiredTemplateKind::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Definition: Sema.h:7997
clang::Sema::TransformToPotentiallyEvaluated
ExprResult TransformToPotentiallyEvaluated(Expr *E)
Definition: SemaExpr.cpp:17655
clang::Sema::DiagnoseUseOfUnimplementedSelectors
void DiagnoseUseOfUnimplementedSelectors()
Definition: SemaDeclObjC.cpp:5254
clang::Sema::DiagnoseUninstantiableTemplate
bool DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain=true)
Determine whether we would be unable to instantiate this template (because it either has no definitio...
Definition: SemaTemplate.cpp:788
clang::UnaryOperatorKind
UnaryOperatorKind
Definition: OperationKinds.h:30
clang::Sema::CheckSubtractionOperands
QualType CheckSubtractionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr)
Definition: SemaExpr.cpp:11523
clang::Sema::~Sema
~Sema()
Definition: Sema.cpp:458
clang::Sema::OMPIteratorData
Data structure for iterator expression.
Definition: Sema.h:5752
clang::Sema::checkUnusedDeclAttributes
void checkUnusedDeclAttributes(Declarator &D)
checkUnusedDeclAttributes - Given a declarator which is not being used to build a declaration,...
Definition: SemaDeclAttr.cpp:9492
clang::Sema::PragmaStack::Slot::PragmaLocation
SourceLocation PragmaLocation
Definition: Sema.h:599
clang::Sema::NullabilityMap
FileNullabilityMap NullabilityMap
A mapping that describes the nullability we've seen in each header file.
Definition: Sema.h:729
clang::Sema::ActOnOpenMPCall
ExprResult ActOnOpenMPCall(ExprResult Call, Scope *Scope, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig)
Given the potential call expression Call, determine if there is a specialization via the OpenMP decla...
Definition: SemaOpenMP.cpp:7248
clang::Sema::AddOverloadCandidate
void AddOverloadCandidate(FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, bool AllowExplicitConversion=false, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, ConversionSequenceList EarlyConversions=std::nullopt, OverloadCandidateParamOrder PO={})
AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given fun...
Definition: SemaOverload.cpp:6423
clang::PreferredTypeBuilder::enterParenExpr
void enterParenExpr(SourceLocation Tok, SourceLocation LParLoc)
Definition: SemaCodeComplete.cpp:438
clang::Sema::CodeSynthesisContext::DefaultTemplateArgumentChecking
@ DefaultTemplateArgumentChecking
We are checking the validity of a default template argument that has been used when naming a template...
Definition: Sema.h:9227
clang::Sema::CheckObjCDeclScope
bool CheckObjCDeclScope(Decl *D)
Checks that the Objective-C declaration is declared in the global scope.
Definition: SemaDeclObjC.cpp:5080
clang::Sema::DelayedDllExportClasses
SmallVector< CXXRecordDecl *, 4 > DelayedDllExportClasses
Definition: Sema.h:13788
clang::Sema::ActOnOpenMPOrderedDirective
StmtResult ActOnOpenMPOrderedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:11269
clang::Sema::isOpenMPPrivateDecl
OpenMPClauseKind isOpenMPPrivateDecl(ValueDecl *D, unsigned Level, unsigned CapLevel) const
Check if the specified variable is used in 'private' clause.
Definition: SemaOpenMP.cpp:2504
clang::Sema::VerifyICEDiagnoser::diagnoseFold
virtual SemaDiagnosticBuilder diagnoseFold(Sema &S, SourceLocation Loc)
Definition: SemaExpr.cpp:17462
clang::Sema::LookupMovingConstructor
CXXConstructorDecl * LookupMovingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the moving constructor for the given class.
Definition: SemaLookup.cpp:3564
clang::Sema::LateTemplateParserCleanupCB
void LateTemplateParserCleanupCB(void *P)
Definition: Sema.h:924
clang::Sema::getTemplateArgumentPackExpansionPattern
TemplateArgumentLoc getTemplateArgumentPackExpansionPattern(TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, std::optional< unsigned > &NumExpansions) const
Returns the pattern of the pack expansion for a template argument.
Definition: SemaTemplateVariadic.cpp:1063
clang::Sema::VTableUse
std::pair< CXXRecordDecl *, SourceLocation > VTableUse
The list of classes whose vtables have been used within this translation unit, and the source locatio...
Definition: Sema.h:7633
clang::Sema::AA_Initializing
@ AA_Initializing
Definition: Sema.h:3712
clang::Sema::DeleteExprs
llvm::MapVector< FieldDecl *, DeleteLocs > DeleteExprs
Definition: Sema.h:861
clang::Sema::CodeSynthesisContext::NumCallArgs
unsigned NumCallArgs
The number of expressions in CallArgs.
Definition: Sema.h:9324
clang::Sema::ActOnDuplicateODRHashDefinition
bool ActOnDuplicateODRHashDefinition(T *Duplicate, T *Previous)
Check ODR hashes for C/ObjC when merging types from modules.
Definition: Sema.h:3463
clang::Sema::checkAddressOfFunctionIsAvailable
bool checkAddressOfFunctionIsAvailable(const FunctionDecl *Function, bool Complain=false, SourceLocation Loc=SourceLocation())
Returns whether the given function's address can be taken or not, optionally emitting a diagnostic if...
Definition: SemaOverload.cpp:10536
clang::Sema::ImmediateDiagBuilder::~ImmediateDiagBuilder
~ImmediateDiagBuilder()
Definition: Sema.h:1717
clang::Sema::Normal
@ Normal
A normal translation unit fragment.
Definition: Sema.h:1942
clang::Sema::CheckCXXThrowOperand
bool CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ThrowTy, Expr *E)
CheckCXXThrowOperand - Validate the operand of a throw.
Definition: SemaExprCXX.cpp:968
clang::Sema::SubstTemplateParams
TemplateParameterList * SubstTemplateParams(TemplateParameterList *Params, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs, bool EvaluateConstraints=true)
Definition: SemaTemplateInstantiateDecl.cpp:4106
clang::Sema::FST_NSString
@ FST_NSString
Definition: Sema.h:13568
clang::Sema::SubstituteExplicitTemplateArguments
TemplateDeductionResult SubstituteExplicitTemplateArguments(FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
Substitute the explicitly-provided template arguments into the given function template according to C...
Definition: SemaTemplateDeduction.cpp:3188
clang::Sema::ResultTypeCompatibilityKind
ResultTypeCompatibilityKind
Describes the compatibility of a result type with its method.
Definition: Sema.h:10561
clang::Sema::ActOnDecompositionDeclarator
NamedDecl * ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists)
Definition: SemaDeclCXX.cpp:725
clang::Sema::isConstantEvaluated
bool isConstantEvaluated()
Definition: Sema.h:1050
clang::ParsedAttributes
ParsedAttributes - A collection of parsed attributes.
Definition: ParsedAttr.h:1023
clang::Sema::CodeSynthesisContext::InstantiationRange
SourceRange InstantiationRange
The source range that covers the construct that cause the instantiation, e.g., the template-id that c...
Definition: Sema.h:9342
clang::TemplateArgumentList
A template argument list.
Definition: DeclTemplate.h:237
clang::Sema::TrivialABIHandling
TrivialABIHandling
Definition: Sema.h:3380
clang::Module::isModulePurview
bool isModulePurview() const
Does this Module scope describe part of the purview of a standard named C++ module?
Definition: Module.h:165
clang::Sema::checkThisInStaticMemberFunctionAttributes
bool checkThisInStaticMemberFunctionAttributes(CXXMethodDecl *Method)
Check whether 'this' shows up in the attributes of the given static member function.
Definition: SemaDeclCXX.cpp:18350
clang::Sema::RespondsToSelectorSel
Selector RespondsToSelectorSel
will hold 'respondsToSelector:'
Definition: Sema.h:1218
clang::Sema::PushOnScopeChains
void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext=true)
Add this decl to the scope shadowed decl chains.
Definition: SemaDecl.cpp:1537
clang::Sema::BuildQualifiedDeclarationNameExpr
ExprResult BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, const Scope *S, TypeSourceInfo **RecoveryTSI=nullptr)
BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template...
Definition: SemaExpr.cpp:2737
clang::Sema::RequireLiteralType
bool RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Ensure that the type T is a literal type.
Definition: SemaType.cpp:9106
clang::Sema::InstantiateFunctionDeclaration
FunctionDecl * InstantiateFunctionDeclaration(FunctionTemplateDecl *FTD, const TemplateArgumentList *Args, SourceLocation Loc)
Instantiate (or find existing instantiation of) a function template with a given set of template argu...
Definition: SemaTemplateInstantiateDecl.cpp:4765
clang::Sema::LocalEagerInstantiationScope
Definition: Sema.h:9884
clang::Sema::OriginalCallArg::OriginalParamType
QualType OriginalParamType
Definition: Sema.h:9036
clang::Sema::NameClassification::getType
ParsedType getType() const
Definition: Sema.h:2747
clang::Sema::AssumedTemplateKind::FoundFunctions
@ FoundFunctions
This is assumed to be a template name because lookup found one or more functions (but no function tem...
clang::Sema::OCK_CategoryImplementation
@ OCK_CategoryImplementation
Definition: Sema.h:10179
clang::Sema::emitDeferredDiags
void emitDeferredDiags()
Definition: Sema.cpp:1775
clang::Sema::ActOnIndirectGotoStmt
StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc, SourceLocation StarLoc, Expr *DestExp)
Definition: SemaStmt.cpp:3291
clang::Sema::CFT_Device
@ CFT_Device
Definition: Sema.h:13049
clang::Sema::ReferenceConversionsScope::Qualification
@ Qualification
Definition: Sema.h:12671
clang::Sema::ActOnAtEnd
Decl * ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=std::nullopt, ArrayRef< DeclGroupPtrTy > allTUVars=std::nullopt)
Definition: SemaDeclObjC.cpp:3981
clang::Sema::GlobalEagerInstantiationScope
Definition: Sema.h:9829
clang::Sema::BuildObjCBoxedExpr
ExprResult BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr)
BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.
Definition: SemaExprObjC.cpp:501
clang::Sema::isAcceptableNestedNameSpecifier
bool isAcceptableNestedNameSpecifier(const NamedDecl *SD, bool *CanCorrect=nullptr)
Determines whether the given declaration is an valid acceptable result for name lookup of a nested-na...
Definition: SemaCXXScopeSpec.cpp:328
clang::Sema::ContextRAII
A RAII object to temporarily push a declaration context.
Definition: Sema.h:1000
clang::Sema::startOpenMPCXXRangeFor
void startOpenMPCXXRangeFor()
If the current region is a range loop-based region, mark the start of the loop construct.
Definition: SemaOpenMP.cpp:2496
clang::Sema::ActOnNumericConstant
ExprResult ActOnNumericConstant(const Token &Tok, Scope *UDLScope=nullptr)
Definition: SemaExpr.cpp:3748
clang::Sema::DeclareGlobalNewDelete
void DeclareGlobalNewDelete()
DeclareGlobalNewDelete - Declare the global forms of operator new and delete.
Definition: SemaExprCXX.cpp:2967
clang::Sema::ActOnOpenMPUseDevicePtrClause
OMPClause * ActOnOpenMPUseDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_ptr' clause.
Definition: SemaOpenMP.cpp:23152
clang::Sema::CodeCompletePostfixExpression
void CodeCompletePostfixExpression(Scope *S, ExprResult LHS, QualType PreferredType)
Definition: SemaCodeComplete.cpp:4835
clang::Sema::ActOnArrayTypeTrait
ExprResult ActOnArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
ActOnArrayTypeTrait - Parsed one of the binary type trait support pseudo-functions.
Definition: SemaExprCXX.cpp:5813
clang::Sema::ActOnFileScopeAsmDecl
Decl * ActOnFileScopeAsmDecl(Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
Definition: SemaDecl.cpp:19787
clang::Sema::CheckVectorOperands
QualType CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversion, bool AllowBoolOperation, bool ReportInvalid)
type checking for vector binary operators.
Definition: SemaExpr.cpp:10656
clang::BinaryOperatorKind
BinaryOperatorKind
Definition: OperationKinds.h:25
clang::Sema::FunctionScopeRAII
An RAII helper that pops function a function scope on exit.
Definition: Sema.h:5046
clang::Sema::ReferenceConversionsScope::NestedQualification
@ NestedQualification
Definition: Sema.h:12672
clang::Sema::LookupSingleName
NamedDecl * LookupSingleName(Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
Look up a name, looking for a single declaration.
Definition: SemaLookup.cpp:3289
clang::Sema::OpenMPVarListDataTy::ExtraModifier
int ExtraModifier
Additional modifier for linear, map, depend or lastprivate clause.
Definition: Sema.h:11982
clang::Sema::CurrentInstantiationScope
LocalInstantiationScope * CurrentInstantiationScope
The current instantiation scope used to store local variables.
Definition: Sema.h:9790
clang::Sema::DiagnoseUnknownTypeName
void DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName=false)
Definition: SemaDecl.cpp:720
clang::Sema::DelayedDiagnosticsState
Definition: Sema.h:939
clang::Sema::NameClassification::Unknown
static NameClassification Unknown()
Definition: Sema.h:2686
clang::Sema::getCurFunctionAvailabilityContext
sema::FunctionScopeInfo * getCurFunctionAvailabilityContext()
Retrieve the current function, if any, that should be analyzed for potential availability violations.
Definition: SemaAvailability.cpp:917
clang::Sema::getCurMethodDecl
ObjCMethodDecl * getCurMethodDecl()
getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the meth...
Definition: Sema.cpp:1462
clang::Sema::PrintStats
void PrintStats() const
Print out statistics about the semantic analysis.
Definition: Sema.cpp:557
clang::Sema::ActOnOpenMPProcBindClause
OMPClause * ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'proc_bind' clause.
Definition: SemaOpenMP.cpp:16802
clang::Sema::AbstractVariableType
@ AbstractVariableType
Definition: Sema.h:7939
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo(AlignPackInfo::Mode M, bool IsXL)
Definition: Sema.h:506
clang::sema::TemplateDeductionInfo
Provides information about an attempted template argument deduction, whose success or failure was des...
Definition: TemplateDeduction.h:42
clang::Sema::CreateBuiltin
FunctionDecl * CreateBuiltin(IdentifierInfo *II, QualType Type, unsigned ID, SourceLocation Loc)
Definition: SemaDecl.cpp:2376
clang::ExprValueKind
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
Definition: Specifiers.h:120
clang::Sema::LK_Boxed
@ LK_Boxed
Definition: Sema.h:3956
clang::ModuleLoader
Abstract interface for a module loader.
Definition: ModuleLoader.h:82
clang::UnaryTransformType::UTTKind
UTTKind
Definition: Type.h:4742
clang::Sema::ActOnOpenMPMergeableClause
OMPClause * ActOnOpenMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'mergeable' clause.
Definition: SemaOpenMP.cpp:17416
clang::Sema::BuildDecltypeType
QualType BuildDecltypeType(Expr *E, bool AsUnevaluated=true)
If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building...
Definition: SemaType.cpp:9296
clang::Sema::ActOnOpenMPMaskedDirective
StmtResult ActOnOpenMPMaskedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp masked' after parsing of the.
Definition: SemaOpenMP.cpp:10813
clang::Sema::getExprRange
SourceRange getExprRange(Expr *E) const
Definition: SemaExpr.cpp:497
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:85
clang::Sema::DefaultVariadicArgumentPromotion
ExprResult DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resul...
Definition: SemaExpr.cpp:1019
clang::Sema::BuildBitIntType
QualType BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc)
Build a bit-precise integer type.
Definition: SemaType.cpp:2314
clang::Sema::CodeCompleteObjCInterfaceDecl
void CodeCompleteObjCInterfaceDecl(Scope *S)
Definition: SemaCodeComplete.cpp:8448
clang::Sema::addImplicitTypedef
void addImplicitTypedef(StringRef Name, QualType T)
Definition: Sema.cpp:261
clang::Sema::NC_UndeclaredTemplate
@ NC_UndeclaredTemplate
The name was classified as an ADL-only function template name.
Definition: Sema.h:2661
clang::Sema::areMultiversionVariantFunctionsCompatible
bool areMultiversionVariantFunctionsCompatible(const FunctionDecl *OldFD, const FunctionDecl *NewFD, const PartialDiagnostic &NoProtoDiagID, const PartialDiagnosticAt &NoteCausedDiagIDAt, const PartialDiagnosticAt &NoSupportDiagIDAt, const PartialDiagnosticAt &DiffDiagIDAt, bool TemplatesSupported, bool ConstexprSupported, bool CLinkageMayDiffer)
Checks if the variant/multiversion functions are compatible.
Definition: SemaDecl.cpp:10959
clang::Sema::NTCUC_FunctionReturn
@ NTCUC_FunctionReturn
Definition: Sema.h:2995
clang::Sema::OMPIteratorData::DeclIdent
IdentifierInfo * DeclIdent
Definition: Sema.h:5753
clang::Sema::getTemplateNameKindForDiagnostics
TemplateNameKindForDiagnostics getTemplateNameKindForDiagnostics(TemplateName Name)
Definition: SemaDecl.cpp:1325
clang::Sema::DiagnoseUnusedLambdaCapture
bool DiagnoseUnusedLambdaCapture(SourceRange CaptureRange, const sema::Capture &From)
Diagnose if an explicit lambda capture is unused.
Definition: SemaLambda.cpp:1722
clang::Sema::getModuleLoader
ModuleLoader & getModuleLoader() const
Retrieve the module loader associated with the preprocessor.
Definition: Sema.cpp:61
clang::Sema::CreateOverloadedBinOp
ExprResult CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool RequiresADL=true, bool AllowRewrittenCandidates=true, FunctionDecl *DefaultedFn=nullptr)
Create a binary operation that may resolve to an overloaded operator.
Definition: SemaOverload.cpp:13818
clang::Sema::isModuleVisible
bool isModuleVisible(const Module *M, bool ModulePrivate=false)
Definition: SemaLookup.cpp:1860
clang::Sema::PrintContextStack
void PrintContextStack()
Definition: Sema.h:9645
clang::Sema::IsAtLeastAsConstrained
bool IsAtLeastAsConstrained(NamedDecl *D1, MutableArrayRef< const Expr * > AC1, NamedDecl *D2, MutableArrayRef< const Expr * > AC2, bool &Result)
Check whether the given declaration's associated constraints are at least as constrained than another...
Definition: SemaConcept.cpp:1363
clang::Sema::ActOnStartOfTranslationUnit
void ActOnStartOfTranslationUnit()
This is called before the very first declaration in the translation unit is parsed.
Definition: Sema.cpp:1023
clang::Sema::CheckAssignmentConstraints
AssignConvertType CheckAssignmentConstraints(SourceLocation Loc, QualType LHSType, QualType RHSType)
CheckAssignmentConstraints - Perform type checking for assignment, argument passing,...
Definition: SemaExpr.cpp:9720
clang::Sema::getFunctionLevelDeclContext
DeclContext * getFunctionLevelDeclContext(bool AllowLambda=false)
If AllowLambda is true, treat lambda as function.
Definition: Sema.cpp:1437
clang::Sema::mightBeIntendedToBeTemplateName
bool mightBeIntendedToBeTemplateName(ExprResult E, bool &Dependent)
Determine whether it's plausible that E was intended to be a template-name.
Definition: Sema.h:2841
clang::Sema::ImplicitMSInheritanceAttrLoc
SourceLocation ImplicitMSInheritanceAttrLoc
Source location for newly created implicit MSInheritanceAttrs.
Definition: Sema.h:441
clang::Sema::ActOnObjCAtTryStmt
StmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try, MultiStmtArg Catch, Stmt *Finally)
Definition: SemaStmt.cpp:4212
clang::TypedefDecl
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3390
clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other, bool ShouldEnter=true)
Definition: Sema.h:13921
clang::Sema::AddTemplateConversionCandidate
void AddTemplateConversionCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
Adds a conversion function template specialization candidate to the overload set, using template argu...
Definition: SemaOverload.cpp:7659
clang::Sema::ReferencedSelectors
llvm::MapVector< Selector, SourceLocation > ReferencedSelectors
Method selectors used in a @selector expression.
Definition: Sema.h:1537
clang::Sema::ActOnOpenMPAlignClause
OMPClause * ActOnOpenMPAlignClause(Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'align' clause.
Definition: SemaOpenMP.cpp:16989
clang::Sema::NC_Concept
@ NC_Concept
The name was classified as a concept name.
Definition: Sema.h:2663
clang::OpaquePtr< QualType >::make
static OpaquePtr make(QualType P)
Definition: Ownership.h:60
clang::Sema::CheckMain
void CheckMain(FunctionDecl *FD, const DeclSpec &D)
Definition: SemaDecl.cpp:11949
clang::Sema::isThisOutsideMemberFunctionBody
bool isThisOutsideMemberFunctionBody(QualType BaseType)
Determine whether the given type is the type of *this that is used outside of the body of a member fu...
Definition: SemaExprCXX.cpp:1410
clang::Sema::checkUnknownAnyArg
ExprResult checkUnknownAnyArg(SourceLocation callLoc, Expr *result, QualType &paramType)
Type-check an expression that's being passed to an __unknown_anytype parameter.
Definition: SemaExpr.cpp:20879
clang::Sema::lookupStdExperimentalNamespace
NamespaceDecl * lookupStdExperimentalNamespace()
Definition: SemaDeclCXX.cpp:11390
clang::Sema::ActOnPragmaMSFunction
void ActOnPragmaMSFunction(SourceLocation Loc, const llvm::SmallVectorImpl< StringRef > &NoBuiltins)
Call on well formed #pragma function.
Definition: SemaAttr.cpp:1175
clang::Sema::InstantiateEnum
bool InstantiateEnum(SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiate the definition of an enum from a given pattern.
Definition: SemaTemplateInstantiate.cpp:3316
clang::Sema::isNonTypeNestedNameSpecifier
bool isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo)
Definition: SemaCXXScopeSpec.cpp:397
Priority
int Priority
Definition: Format.cpp:2777
clang::Sema::ActOnOpenMPAlignedClause
OMPClause * ActOnOpenMPAlignedClause(ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'aligned' clause.
Definition: SemaOpenMP.cpp:20176
clang::Sema::SpecialMemberOverloadResultEntry::SpecialMemberOverloadResultEntry
SpecialMemberOverloadResultEntry(const llvm::FoldingSetNodeID &ID)
Definition: Sema.h:1449
clang::Sema::CheckConstexprKind::CheckValid
@ CheckValid
Identify whether this function satisfies the formal rules for constexpr functions in the current lanu...
clang::Sema::PopParsingDeclaration
void PopParsingDeclaration(ParsingDeclState state, Decl *decl)
Definition: SemaDeclAttr.cpp:9711
clang::Sema::NSDictionaryDecl
ObjCInterfaceDecl * NSDictionaryDecl
The declaration of the Objective-C NSDictionary class.
Definition: Sema.h:1209
clang::Sema::TemplateParameterListsAreEqual
bool TemplateParameterListsAreEqual(TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation(), bool PartialOrdering=false)
Definition: Sema.h:8442
clang::Sema::DiagnoseUnterminatedPragmaAlignPack
void DiagnoseUnterminatedPragmaAlignPack()
Definition: SemaAttr.cpp:477
clang::Sema::ACR_error
@ ACR_error
Definition: Sema.h:12731
clang::Sema::AA_Converting
@ AA_Converting
Definition: Sema.h:3711
clang::Sema::CheckEquivalentExceptionSpec
bool CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New)
Definition: SemaExceptionSpec.cpp:292
clang::Sema::addLambdaParameters
void addLambdaParameters(ArrayRef< LambdaIntroducer::LambdaCapture > Captures, CXXMethodDecl *CallOperator, Scope *CurScope)
Introduce the lambda parameters into scope.
Definition: SemaLambda.cpp:549
clang::PartialDiagnostic::getDiagID
unsigned getDiagID() const
Definition: PartialDiagnostic.h:141
clang::Sema::MarkDeclRefReferenced
void MarkDeclRefReferenced(DeclRefExpr *E, const Expr *Base=nullptr)
Perform reference-marking and odr-use handling for a DeclRefExpr.
Definition: SemaExpr.cpp:19980
clang::Sema::actOnObjCTypeParamList
ObjCTypeParamList * actOnObjCTypeParamList(Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc)
Definition: SemaDeclObjC.cpp:770
clang::Sema::CheckTemplateTemplateArgument
bool CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg)
Check a template argument against its corresponding template template parameter.
Definition: SemaTemplate.cpp:7686
clang::Sema::BuildTypeConstraint
bool BuildTypeConstraint(const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc, bool AllowUnexpandedPack)
Definition: SemaTemplate.cpp:1118
clang::Sema::mergeSectionAttr
SectionAttr * mergeSectionAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name)
Definition: SemaDeclAttr.cpp:3270
clang::Sema::NamedReturnInfo::None
@ None
Definition: Sema.h:5170
clang::Sema::ActOnOMPIteratorExpr
ExprResult ActOnOMPIteratorExpr(Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef< OMPIteratorData > Data)
Definition: SemaExpr.cpp:5354
clang::Sema::NameClassification::Expr
ExprResult Expr
Definition: Sema.h:2669
clang::Sema::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope
void ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Decl *D)
Act on D, a function definition inside of an omp [begin/end] assumes.
Definition: SemaOpenMP.cpp:7113
clang::Sema::getTemplateDepth
unsigned getTemplateDepth(Scope *S) const
Determine the number of levels of enclosing template parameters.
Definition: SemaTemplate.cpp:54
clang::Sema::anchor
virtual void anchor()
This virtual key function only exists to limit the emission of debug info describing the Sema class.
Definition: Sema.cpp:259
clang::Sema::BuildDeclaratorGroup
DeclGroupPtrTy BuildDeclaratorGroup(MutableArrayRef< Decl * > Group)
BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necess...
Definition: SemaDecl.cpp:14483
clang::Sema::getDestructorTypeForDecltype
ParsedType getDestructorTypeForDecltype(const DeclSpec &DS, ParsedType ObjectType)
Definition: SemaExprCXX.cpp:465
clang::PartialDiagnostic
Definition: PartialDiagnostic.h:31
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:82
clang::Sema::tryCaptureOpenMPLambdas
void tryCaptureOpenMPLambdas(ValueDecl *V)
Function tries to capture lambda's captured variables in the OpenMP region before the original lambda...
Definition: SemaOpenMP.cpp:4721
clang::Sema::ActOnCXXNamedCast
ExprResult ActOnCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, SourceLocation LAngleBracketLoc, Declarator &D, SourceLocation RAngleBracketLoc, SourceLocation LParenLoc, Expr *E, SourceLocation RParenLoc)
ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const,addrspace}_cast's.
Definition: SemaCast.cpp:273
clang::Sema::InstantiatingTemplate
A stack object to be created when performing template instantiation.
Definition: Sema.h:9467
clang::Sema::ModuleDeclKind::PartitionImplementation
@ PartitionImplementation
'module X:Y;'
clang::Sema::BuildPossibleImplicitMemberExpr
ExprResult BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, UnresolvedLookupExpr *AsULE=nullptr)
Builds an expression which might be an implicit member expression.
Definition: SemaExprMember.cpp:235
clang::Sema::InvalidOperands
QualType InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
the following "Check" methods will return a valid/converted QualType or a null QualType (indicating a...
Definition: SemaExpr.cpp:10349
clang::Sema::isValidVarArgType
VarArgKind isValidVarArgType(const QualType &Ty)
Determine the degree of POD-ness for an expression.
Definition: SemaExpr.cpp:922
clang::Sema::PragmaStack::CurrentValue
ValueType CurrentValue
Definition: Sema.h:671
clang::Sema::CreateUnaryExprOrTypeTraitExpr
ExprResult CreateUnaryExprOrTypeTraitExpr(TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
Build a sizeof or alignof expression given a type operand.
Definition: SemaExpr.cpp:4598
clang::Sema::CurrentParameterCopyTypes
llvm::SmallVector< QualType, 4 > CurrentParameterCopyTypes
Stack of types that correspond to the parameter entities that are currently being copy-initialized.
Definition: Sema.h:1589
clang::Sema::SetIvarInitializers
void SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation)
SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whos...
Definition: SemaDeclCXX.cpp:18124
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::Sema::CodeSynthesisContext::ConstraintNormalization
@ ConstraintNormalization
Definition: Sema.h:9265
clang::Sema::MaybeCreateExprWithCleanups
Expr * MaybeCreateExprWithCleanups(Expr *SubExpr)
MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups,...
Definition: SemaExprCXX.cpp:7327
clang::Sema::UPPC_BitFieldWidth
@ UPPC_BitFieldWidth
The size of a bit-field.
Definition: Sema.h:8603
clang::Sema::SemaDiagnosticBuilder
A generic diagnostic builder for errors which may or may not be deferred.
Definition: Sema.h:1770
clang::Sema::DiagnoseMisalignedMembers
void DiagnoseMisalignedMembers()
Diagnoses the current set of gathered accesses.
Definition: SemaChecking.cpp:17654
clang::Sema::FnBodyKind::Delete
@ Delete
= delete ;
clang::Sema::ActOnOpenMPFirstprivateClause
OMPClause * ActOnOpenMPFirstprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'firstprivate' clause.
Definition: SemaOpenMP.cpp:18132
clang::Sema::ObjCLiteralKind
ObjCLiteralKind
Definition: Sema.h:3952
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:579
clang::Sema::propagateDLLAttrToBaseClassTemplate
void propagateDLLAttrToBaseClassTemplate(CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc)
Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibi...
Definition: SemaDeclCXX.cpp:6495
clang::Sema::RecordParsingTemplateParameterDepth
void RecordParsingTemplateParameterDepth(unsigned Depth)
This is used to inform Sema what the current TemplateParameterDepth is during Parsing.
Definition: Sema.cpp:2140
clang::InitializationKind
Describes the kind of initialization being performed, along with location information for tokens rela...
Definition: Initialization.h:566
clang::Sema::BuildAsTypeExpr
ExprResult BuildAsTypeExpr(Expr *E, QualType DestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
Create a new AsTypeExpr node (bitcast) from the arguments.
Definition: SemaExpr.cpp:7121
clang::Sema::getObjCInterfaceDecl
ObjCInterfaceDecl * getObjCInterfaceDecl(IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
Look for an Objective-C class in the translation unit.
Definition: SemaDecl.cpp:2302
clang::Sema::mergeTypeVisibilityAttr
TypeVisibilityAttr * mergeTypeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI, TypeVisibilityAttr::VisibilityType Vis)
Definition: SemaDeclAttr.cpp:2874
clang::Sema::ActOnPackExpansion
ParsedTemplateArgument ActOnPackExpansion(const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
Definition: SemaTemplateVariadic.cpp:570
clang::ActionResult< Expr * >
clang::Sema::AddParameterABIAttr
void AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI ABI)
Definition: SemaDeclAttr.cpp:5404
clang::Sema::BuildExceptionDeclaration
VarDecl * BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
Perform semantic analysis for the variable declaration that occurs within a C++ catch clause,...
Definition: SemaDeclCXX.cpp:16434
clang::Sema::RequiredTemplateKind::RequiredTemplateKind
RequiredTemplateKind(TemplateNameIsRequiredTag)
Template name is unconditionally required.
Definition: Sema.h:7995
clang::Sema::getMessageSendResultType
QualType getMessageSendResultType(const Expr *Receiver, QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage)
Determine the result of a message send expression based on the type of the receiver,...
Definition: SemaExprObjC.cpp:1517
clang::Sema::CodeSynthesisContext::DeclaringImplicitEqualityComparison
@ DeclaringImplicitEqualityComparison
We are declaring an implicit 'operator==' for a defaulted 'operator<=>'.
Definition: Sema.h:9249
clang::Sema::GetOrCreateMSAsmLabel
LabelDecl * GetOrCreateMSAsmLabel(StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
Definition: SemaStmtAsm.cpp:968
clang::FunctionProtoType::ExceptionSpecInfo::Type
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: Type.h:4082
clang::Sema::CodeCompleteObjCMethodDecl
void CodeCompleteObjCMethodDecl(Scope *S, std::optional< bool > IsInstanceMethod, ParsedType ReturnType)
Definition: SemaCodeComplete.cpp:9450
clang::Sema::Cleanup
CleanupInfo Cleanup
Used to control the generation of ExprWithCleanups.
Definition: Sema.h:786
clang::Sema::ActOnOpenMPTargetParallelDirective
StmtResult ActOnOpenMPTargetParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target parallel' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13021
clang::Sema::getPreprocessor
Preprocessor & getPreprocessor() const
Definition: Sema.h:1661
clang::Sema::DeferDiagsRAII::~DeferDiagsRAII
~DeferDiagsRAII()
Definition: Sema.h:1900
clang::Sema::POAK_Power
@ POAK_Power
Definition: Sema.h:10578
clang::ASTReader
Reads an AST files chain containing the contents of a translation unit.
Definition: ASTReader.h:359
clang::Sema::CreateCapturedStmtRecordDecl
RecordDecl * CreateCapturedStmtRecordDecl(CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
Definition: SemaStmt.cpp:4635
clang::Sema::DelayedDiagnostics::getCurrentPool
sema::DelayedDiagnosticPool * getCurrentPool() const
Returns the current delayed-diagnostics pool.
Definition: Sema.h:963
clang::Sema::ReuseLambdaContextDecl
@ ReuseLambdaContextDecl
Definition: Sema.h:5394
clang::Sema::CodeSynthesisContext::NumTemplateArgs
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
Definition: Sema.h:9321
clang::Sema::ReferenceConversionsScope::ReferenceConversions
ReferenceConversions
The conversions that would be performed on an lvalue of type T2 when binding a reference of type T1 t...
Definition: Sema.h:12670
clang::Sema::MarkFunctionParmPackReferenced
void MarkFunctionParmPackReferenced(FunctionParmPackExpr *E)
Perform reference-marking and odr-use handling for a FunctionParmPackExpr.
Definition: SemaExpr.cpp:20021
clang::Sema::getEmissionStatus
FunctionEmissionStatus getEmissionStatus(FunctionDecl *Decl, bool Final=false)
Definition: SemaDecl.cpp:19866
clang::Sema::CallingConventionIgnoredReason
CallingConventionIgnoredReason
Describes the reason a calling convention specification was ignored, used for diagnostics.
Definition: Sema.h:13869
clang::Sema::ActOnConstantExpression
ExprResult ActOnConstantExpression(ExprResult Res)
Definition: SemaExpr.cpp:19684
clang::CXXThisExpr
Represents the this expression in C++.
Definition: ExprCXX.h:1148
clang::Sema::ExpressionEvaluationContext::ConstantEvaluated
@ ConstantEvaluated
The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at com...
clang::Sema::AllowedExplicit::All
@ All
Allow both explicit conversion functions and explicit constructors.
ComparisonCategories.h
clang::Sema::CodeCompleteAvailabilityPlatformName
void CodeCompleteAvailabilityPlatformName()
Definition: SemaCodeComplete.cpp:10100
clang::Sema::UPPC_StaticAssertExpression
@ UPPC_StaticAssertExpression
The expression in a static assertion.
Definition: Sema.h:8606
clang::Sema::collectUnexpandedParameterPacks
void collectUnexpandedParameterPacks(TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
Collect the set of unexpanded parameter packs within the given template argument.
Definition: SemaTemplateVariadic.cpp:532
clang::Sema::mergeMSInheritanceAttr
MSInheritanceAttr * mergeMSInheritanceAttr(Decl *D, const AttributeCommonInfo &CI, bool BestCase, MSInheritanceModel Model)
Definition: SemaDeclAttr.cpp:7944
clang::Sema::ActOnTemplateTemplateParameter
NamedDecl * ActOnTemplateTemplateParameter(Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg)
ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e....
Definition: SemaTemplate.cpp:1614
clang::Sema::CollectMultipleMethodsInGlobalPool
bool CollectMultipleMethodsInGlobalPool(Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool InstanceFirst, bool CheckTheOther, const ObjCObjectType *TypeBound=nullptr)
We first select the type of the method: Instance or Factory, then collect all methods with that type.
Definition: SemaDeclObjC.cpp:3512
clang::Sema::getMostSpecialized
UnresolvedSetIterator getMostSpecialized(UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
Retrieve the most specialized of the given function template specializations.
Definition: SemaTemplateDeduction.cpp:5352
clang::Sema::CheckConstexprFunctionDefinition
bool CheckConstexprFunctionDefinition(const FunctionDecl *FD, CheckConstexprKind Kind)
Definition: SemaDeclCXX.cpp:1769
clang::Sema::getDestructorName
ParsedType getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext)
Definition: SemaExprCXX.cpp:139
clang::Sema::ModuleImportState::ImportAllowed
@ ImportAllowed
after 'module X;' but before any non-import decl.
clang::Sema::PCC_Statement
@ PCC_Statement
Code completion occurs within a statement, which may also be an expression or a declaration.
Definition: Sema.h:13227
clang::Sema::ActOnConvertVectorExpr
ExprResult ActOnConvertVectorExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_convertvector(...)
Definition: SemaExpr.cpp:7140
IsStatic
bool IsStatic
Definition: Format.cpp:2785
clang::Sema::targetDiag
SemaDiagnosticBuilder targetDiag(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD=nullptr)
Definition: Sema.cpp:1861
clang::TranslationUnitKind
TranslationUnitKind
Describes the kind of translation unit being processed.
Definition: LangOptions.h:917
clang::Sema::OverloadKind
OverloadKind
C++ Overloading.
Definition: Sema.h:3719
clang::attr::ParsedSubjectMatchRuleSet
llvm::DenseMap< int, SourceRange > ParsedSubjectMatchRuleSet
Definition: AttrSubjectMatchRules.h:29
clang::Sema::CodeSynthesisContext::ExceptionSpecEvaluation
@ ExceptionSpecEvaluation
We are computing the exception specification for a defaulted special member function.
Definition: Sema.h:9231
clang::Sema::CodeCompleteObjCSuperMessage
void CodeCompleteObjCSuperMessage(Scope *S, SourceLocation SuperLoc, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression)
Definition: SemaCodeComplete.cpp:7930
clang::Sema::ICEConvertDiagnoser::diagnoseNoMatch
SemaDiagnosticBuilder diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T) override
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
Definition: Sema.h:3928
clang::Sema::tryCaptureVariable
bool tryCaptureVariable(ValueDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
Try to capture the given variable.
Definition: SemaExpr.cpp:19036
clang::sema::LambdaScopeInfo
Definition: ScopeInfo.h:832
clang::Sema::PragmaSectionKind
PragmaSectionKind
Definition: Sema.h:10631
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:138
clang::Sema::ObjCClassMessage
@ ObjCClassMessage
The message is a class message, and the identifier is a type name.
Definition: Sema.h:10448
clang::Sema::ExtVectorDecls
ExtVectorDeclsType ExtVectorDecls
ExtVectorDecls - This is a list all the extended vector types.
Definition: Sema.h:840
clang::Sema::isImmediateFunctionContext
bool isImmediateFunctionContext() const
Definition: Sema.h:9682
DeclarationName.h
clang::IfStatementKind
IfStatementKind
In an if statement, this denotes whether the statement is a constexpr or consteval if statement.
Definition: Specifiers.h:36
clang::Sema::ActOnPragmaClangSection
void ActOnPragmaClangSection(SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName)
ActOnPragmaClangSection - Called on well formed #pragma clang section.
Definition: SemaAttr.cpp:275
clang::TypoExpr
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:6212
clang::Sema::OMPIteratorData::Type
ParsedType Type
Definition: Sema.h:5755
clang::Sema::IdentifierSourceLocations
llvm::DenseMap< IdentifierInfo *, SrcLocSet > IdentifierSourceLocations
Definition: Sema.h:9800
clang::Sema::mergeImportModuleAttr
WebAssemblyImportModuleAttr * mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL)
Definition: SemaDeclAttr.cpp:7558
clang::Decl::isUnconditionallyVisible
bool isUnconditionallyVisible() const
Determine whether this declaration is definitely visible to name lookup, independent of whether the o...
Definition: DeclBase.h:824
clang::Sema::CheckParmsForFunctionDef
bool CheckParmsForFunctionDef(ArrayRef< ParmVarDecl * > Parameters, bool CheckParameterNames)
Helpers for dealing with blocks and functions.
Definition: SemaChecking.cpp:15822
clang::Sema::MaybeODRUseExprSet
llvm::SetVector< Expr *, SmallVector< Expr *, 4 >, llvm::SmallPtrSet< Expr *, 4 > > MaybeODRUseExprSet
Store a set of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) t...
Definition: Sema.h:798
clang::DiagnosticBuilder::isActive
bool isActive() const
Determine whether this diagnostic is still active.
Definition: Diagnostic.h:1305
clang::Sema::addAMDGPUFlatWorkGroupSizeAttr
void addAMDGPUFlatWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size attribute to a particular declar...
Definition: SemaDeclAttr.cpp:7748
clang::Sema::AP_InferredFromOtherPlatform
@ AP_InferredFromOtherPlatform
The availability attribute for a specific platform was inferred from an availability attribute for an...
Definition: Sema.h:3631
clang::Sema::CheckStaticLocalForDllExport
void CheckStaticLocalForDllExport(VarDecl *VD)
Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function.
Definition: SemaDecl.cpp:14194
clang::LateParsedTemplate::D
Decl * D
The template function declaration to be late parsed.
Definition: Sema.h:13973
clang::Sema::ActOnModuleEnd
void ActOnModuleEnd(SourceLocation DirectiveLoc, Module *Mod)
The parser has left a submodule.
Definition: SemaModule.cpp:678
clang::NullabilityKind
NullabilityKind
Describes the nullability of a particular type.
Definition: Specifiers.h:320
clang::Sema::LookupInObjCMethod
ExprResult LookupInObjCMethod(LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
Definition: SemaExpr.cpp:2965
clang::Sema::ExpressionEvaluationContextRecord::InDiscardedStatement
bool InDiscardedStatement
Definition: Sema.h:1336
clang::Sema::GetFormatStringType
static FormatStringType GetFormatStringType(const FormatAttr *Format)
Definition: SemaChecking.cpp:9108
clang::Sema::ActOnStartOfSwitchStmt
StmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc)
Definition: SemaStmt.cpp:1090
clang::Sema::ActOnOpenMPTeamsGenericLoopDirective
StmtResult ActOnOpenMPTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10576
clang::Sema::emitAndClearUnusedLocalTypedefWarnings
void emitAndClearUnusedLocalTypedefWarnings()
Definition: Sema.cpp:1007
clang::Sema::ActOnOpenMPCanonicalLoop
StmtResult ActOnOpenMPCanonicalLoop(Stmt *AStmt)
Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to an OpenMP loop directive.
Definition: SemaOpenMP.cpp:5805
clang::Sema::DefaultedFunctionKind::DefaultedFunctionKind
DefaultedFunctionKind(CXXSpecialMember CSM)
Definition: Sema.h:3401
clang::Sema::finalizeOpenMPDelayedAnalysis
void finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc)
Finishes analysis of the deferred functions calls that may be declared as host/nohost during device/h...
Definition: SemaOpenMP.cpp:2695
clang::Sema::ActOnOpenMPTargetExitDataDirective
StmtResult ActOnOpenMPTargetExitDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target exit data' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13207
clang::concepts::ExprRequirement::ReturnTypeRequirement
Definition: ExprConcepts.h:265
clang::Sema::CheckEnumRedeclaration
bool CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev)
Check whether this is a valid redeclaration of a previous enumeration.
Definition: SemaDecl.cpp:16337
clang::Sema::ActOnOpenMPBindClause
OMPClause * ActOnOpenMPBindClause(OpenMPBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on a well-formed 'bind' clause.
Definition: SemaOpenMP.cpp:23831
clang::Sema::ActOnSEHTryBlock
StmtResult ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
Definition: SemaStmt.cpp:4535
clang::Sema::CodeSynthesisContext::SavedInNonInstantiationSFINAEContext
bool SavedInNonInstantiationSFINAEContext
Was the enclosing context a non-instantiation SFINAE context?
Definition: Sema.h:9295
clang::Sema::PragmaMsStackAction
PragmaMsStackAction
Definition: Sema.h:476
clang::Sema::CXXThisTypeOverride
QualType CXXThisTypeOverride
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-stati...
Definition: Sema.h:6640
clang::StmtResult
ActionResult< Stmt * > StmtResult
Definition: Ownership.h:263
clang::Sema::AFS_Both
@ AFS_Both
Look for allocation functions in both the global scope and in the scope of the allocated class.
Definition: Sema.h:6756
clang::Sema::CheckDestructorAccess
AccessResult CheckDestructorAccess(SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
Definition: SemaAccess.cpp:1607
clang::Sema::ActOnForStmt
StmtResult ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, ConditionResult Second, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body)
Definition: SemaStmt.cpp:2131
clang::Sema::NC_Keyword
@ NC_Keyword
The name has been typo-corrected to a keyword.
Definition: Sema.h:2634
clang::Sema::TUK_Reference
@ TUK_Reference
Definition: Sema.h:3308
clang::Sema::FST_FreeBSDKPrintf
@ FST_FreeBSDKPrintf
Definition: Sema.h:13572
clang::Sema::PopPragmaVisibility
void PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc)
PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' ...
Definition: SemaAttr.cpp:1376
clang::Sema::OutermostDeclarationWithDelayedImmediateInvocations
std::optional< ExpressionEvaluationContextRecord::InitializationContext > OutermostDeclarationWithDelayedImmediateInvocations() const
Definition: Sema.h:9713
clang::Sema::getCurScope
Scope * getCurScope() const
Retrieve the parser's current scope.
Definition: Sema.h:13746
clang::Sema::WarnExactTypedMethods
void WarnExactTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches ex...
Definition: SemaDeclObjC.cpp:2629
clang::interp::This
bool This(InterpState &S, CodePtr OpPC)
Definition: Interp.h:1372
clang::Sema::ActOnAfterCompoundStatementLeadingPragmas
void ActOnAfterCompoundStatementLeadingPragmas()
Definition: SemaStmt.cpp:393
clang::Sema::BuildMicrosoftCAnonymousStruct
Decl * BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS, RecordDecl *Record)
BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
Definition: SemaDecl.cpp:5761
clang::DependentDiagnostic
A dependently-generated diagnostic.
Definition: DependentDiagnostic.h:36
clang::Sema::CheckUnusedVolatileAssignment
void CheckUnusedVolatileAssignment(Expr *E)
Check whether E, which is either a discarded-value expression or an unevaluated operand,...
Definition: SemaExpr.cpp:17754
clang::Sema::RetainOwnershipKind::NS
@ NS
clang::Sema::BuildVectorType
QualType BuildVectorType(QualType T, Expr *VecSize, SourceLocation AttrLoc)
Definition: SemaType.cpp:2659
clang::Sema::InNonInstantiationSFINAEContext
bool InNonInstantiationSFINAEContext
Whether we are in a SFINAE context that is not associated with template instantiation.
Definition: Sema.h:9391
clang::Sema::FunctionEmissionStatus::Emitted
@ Emitted
clang::Sema::ActOnSuperScopeSpecifier
bool ActOnSuperScopeSpecifier(SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
The parser has parsed a '__super' nested-name-specifier.
Definition: SemaCXXScopeSpec.cpp:292
clang::Sema::UPPC_FriendDeclaration
@ UPPC_FriendDeclaration
A friend declaration.
Definition: Sema.h:8618
clang::Sema::DiagnoseUnterminatedOpenMPDeclareTarget
void DiagnoseUnterminatedOpenMPDeclareTarget()
Report unterminated 'omp declare target' or 'omp begin declare target' at the end of a compilation un...
Definition: SemaOpenMP.cpp:22874
clang::Expr::NullPointerConstantKind
NullPointerConstantKind
Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant().
Definition: Expr.h:769
clang::Sema::ActOnOpenMPSimdDirective
StmtResult ActOnOpenMPSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10291
clang::Sema::DiagnoseUnknownTemplateName
bool DiagnoseUnknownTemplateName(const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind)
Definition: SemaTemplate.cpp:350
clang::Sema::DefineImplicitLambdaToBlockPointerConversion
void DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a block pointer.
Definition: SemaDeclCXX.cpp:15494
clang::Sema::BuiltinAddReference
QualType BuiltinAddReference(QualType BaseType, UTTKind UKind, SourceLocation Loc)
Definition: SemaType.cpp:9376
clang::FileNullability::PointerEndLoc
SourceLocation PointerEndLoc
The end location for the first pointer declarator in the file.
Definition: Sema.h:256
clang::Sema::SpecialMemberOverloadResultEntry
Definition: Sema.h:1445
clang::Sema::CheckSingleAssignmentConstraints
AssignConvertType CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false, bool ConvertRHS=true)
Check assignment constraints for an assignment of RHS to LHSType.
Definition: SemaExpr.cpp:10171
clang::Sema::CodeSynthesisContext::InitializingStructuredBinding
@ InitializingStructuredBinding
We are initializing a structured binding.
Definition: Sema.h:9278
clang::Sema::LookupNecessaryTypesForBuiltin
void LookupNecessaryTypesForBuiltin(Scope *S, unsigned ID)
Definition: SemaLookup.cpp:977
clang::Sema::ConstSegStack
PragmaStack< StringLiteral * > ConstSegStack
Definition: Sema.h:697
clang::Sema::ActOnOpenMPInReductionClause
OMPClause * ActOnOpenMPInReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
Called on well-formed 'in_reduction' clause.
Definition: SemaOpenMP.cpp:19867
clang::Sema::isDeclInScope
bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false)
isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S',...
Definition: SemaDecl.cpp:1595
clang::Sema::AA_Casting
@ AA_Casting
Definition: Sema.h:3714
clang::Sema::buildLambdaInitCaptureInitialization
QualType buildLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, std::optional< unsigned > NumExpansions, IdentifierInfo *Id, bool DirectInit, Expr *&Init)
Definition: SemaLambda.cpp:798
clang::Builtin::ID
ID
Definition: Builtins.h:64
clang::Sema::CheckParameter
ParmVarDecl * CheckParameter(DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC)
Definition: SemaDecl.cpp:14760
clang::Sema::UnparsedDefaultArgLocs
llvm::DenseMap< ParmVarDecl *, SourceLocation > UnparsedDefaultArgLocs
Definition: Sema.h:1490
clang::FunctionProtoType::ExtProtoInfo
Extra information about a function prototype.
Definition: Type.h:4106
clang::CXXBasePath
Represents a path from a specific derived class (which is not represented as part of the path) to a p...
Definition: CXXInheritance.h:70
clang::Sema::FormatStringHasSArg
bool FormatStringHasSArg(const StringLiteral *FExpr)
Definition: SemaChecking.cpp:10905
clang::Sema::ActOnOpenMPNumTeamsClause
OMPClause * ActOnOpenMPNumTeamsClause(Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_teams' clause.
Definition: SemaOpenMP.cpp:22486
clang::ObjCTypeParamList
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
Definition: DeclObjC.h:657
clang::Sema::CodeCompleteObjCAtExpression
void CodeCompleteObjCAtExpression(Scope *S)
Definition: SemaCodeComplete.cpp:7299
clang::Sema::FunctionDeclAndLoc
A pair of a canonical FunctionDecl and a SourceLocation.
Definition: Sema.h:12957
clang::Sema::NoteOverloadCandidate
void NoteOverloadCandidate(NamedDecl *Found, FunctionDecl *Fn, OverloadCandidateRewriteKind RewriteKind=OverloadCandidateRewriteKind(), QualType DestType=QualType(), bool TakingAddress=false)
Definition: SemaOverload.cpp:10566
clang::LangOptions::PragmaMSPointersToMembersKind
PragmaMSPointersToMembersKind
Definition: LangOptions.h:121
clang::Sema::diagnoseNullResettableSynthesizedSetters
void diagnoseNullResettableSynthesizedSetters(const ObjCImplDecl *impDecl)
Diagnose any null-resettable synthesized setters.
Definition: SemaObjCProperty.cpp:2137
clang::Sema::CheckCompleteVariableDeclaration
void CheckCompleteVariableDeclaration(VarDecl *VD)
Definition: SemaDecl.cpp:13896
clang::Sema::hasGlobalOpenMPAssumes
bool hasGlobalOpenMPAssumes() const
Check if there is an active global omp assumes directive.
Definition: Sema.h:11181
clang::Sema::usesPartialOrExplicitSpecialization
bool usesPartialOrExplicitSpecialization(SourceLocation Loc, ClassTemplateSpecializationDecl *ClassTemplateSpec)
Definition: SemaTemplateInstantiate.cpp:3456
clang::Sema::CompoundScopeRAII::CompoundScopeRAII
CompoundScopeRAII(Sema &S, bool IsStmtExpr=false)
Definition: Sema.h:5033
clang::Sema::LookupNestedNameSpecifierName
@ LookupNestedNameSpecifierName
Look up of a name that precedes the '::' scope resolution operator in C++.
Definition: Sema.h:4307
clang::Sema::MarkDeducedTemplateParameters
void MarkDeducedTemplateParameters(const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
Definition: Sema.h:9166
clang::Sema::OSMK_RetainingInit
@ OSMK_RetainingInit
Definition: Sema.h:10382
clang::Sema::getOpenMPDeclareMapperVarName
const ValueDecl * getOpenMPDeclareMapperVarName() const
Definition: SemaOpenMP.cpp:22481
clang::Sema::ImplicitExceptionSpecification::getExceptionSpecType
ExceptionSpecificationType getExceptionSpecType() const
Get the computed exception specification type.
Definition: Sema.h:6307
clang::Sema::CheckLogicalOperands
QualType CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:13575
clang::Sema::EndOpenMPClause
void EndOpenMPClause()
End analysis of clauses.
Definition: SemaOpenMP.cpp:2764
clang::Sema::DiagnoseAbsenceOfOverrideControl
void DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent)
DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of ...
Definition: SemaDeclCXX.cpp:3172
clang::Sema::mergeDeclAttributes
void mergeDeclAttributes(NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
mergeDeclAttributes - Copy attributes from the Old decl to the New one.
Definition: SemaDecl.cpp:3168
clang::Sema::FullExprArg::FullExprArg
FullExprArg()
Definition: Sema.h:4981
clang
Definition: CalledOnceCheck.h:17
clang::Sema::PushFunctionScope
void PushFunctionScope()
Enter a new function scope.
Definition: Sema.cpp:2117
clang::Sema::CFT_Global
@ CFT_Global
Definition: Sema.h:13050
clang::Sema::CheckConstexprKind
CheckConstexprKind
Definition: Sema.h:2941
clang::Sema::CreateRecoveryExpr
ExprResult CreateRecoveryExpr(SourceLocation Begin, SourceLocation End, ArrayRef< Expr * > SubExprs, QualType T=QualType())
Attempts to produce a RecoveryExpr after some AST node cannot be created.
Definition: SemaExpr.cpp:21171
clang::Sema::ProduceCtorInitMemberSignatureHelp
QualType ProduceCtorInitMemberSignatureHelp(Decl *ConstructorDecl, CXXScopeSpec SS, ParsedType TemplateTypeTy, ArrayRef< Expr * > ArgExprs, IdentifierInfo *II, SourceLocation OpenParLoc, bool Braced)
Definition: SemaCodeComplete.cpp:6339
clang::IndirectFieldDecl
Represents a field injected from an anonymous union/struct into the parent scope.
Definition: Decl.h:3197
clang::Sema::DictionaryWithObjectsMethod
ObjCMethodDecl * DictionaryWithObjectsMethod
The declaration of the dictionaryWithObjects:forKeys:count: method.
Definition: Sema.h:1212
clang::Sema::mergeObjCMethodDecls
void mergeObjCMethodDecls(ObjCMethodDecl *New, ObjCMethodDecl *Old)
Definition: SemaDecl.cpp:4341
clang::Sema::PerformMemberExprBaseConversion
ExprResult PerformMemberExprBaseConversion(Expr *Base, bool IsArrow)
Perform conversions on the LHS of a member access expression.
Definition: SemaExprMember.cpp:1227
clang::Sema::OffsetOfKind
OffsetOfKind
Definition: Sema.h:3314
clang::Sema::DiagIfReachable
bool DiagIfReachable(SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the statements's reachability analysis.
Definition: SemaExpr.cpp:20155
clang::Sema::inferGslPointerAttribute
void inferGslPointerAttribute(NamedDecl *ND, CXXRecordDecl *UnderlyingRecord)
Add gsl::Pointer attribute to std::container::iterator.
Definition: SemaAttr.cpp:111
clang::Sema::ImplicitlyRetainedSelfLocs
llvm::SmallVector< std::pair< SourceLocation, const BlockDecl * >, 1 > ImplicitlyRetainedSelfLocs
List of SourceLocations where 'self' is implicitly retained inside a block.
Definition: Sema.h:1542
clang::Sema::PragmaClangSection::Valid
bool Valid
Definition: Sema.h:466
clang::Sema::isConstantEvaluatedOverride
bool isConstantEvaluatedOverride
Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextReco...
Definition: Sema.h:1048
clang::Sema::ObjCInstanceMessage
@ ObjCInstanceMessage
The message is an instance message.
Definition: Sema.h:10445
clang::Sema::CheckTypenameType
QualType CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, TypeSourceInfo **TSI, bool DeducedTSTContext)
Definition: SemaTemplate.cpp:10899
clang::Sema::NC_UndeclaredNonType
@ NC_UndeclaredNonType
The name was classified as an ADL-only function name.
Definition: Sema.h:2644
clang::Sema::AlignPackInfo::Mac68k
@ Mac68k
Definition: Sema.h:497
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:759
clang::Sema::ObjCArgInfo
Definition: Sema.h:10386
clang::Sema::TDK_IncompletePack
@ TDK_IncompletePack
Template argument deduction did not deduce a value for every expansion of an expanded template parame...
Definition: Sema.h:8966
clang::sema::CompoundScopeInfo
Contains information about the compound statement currently being parsed.
Definition: ScopeInfo.h:67
clang::Sema::TDK_CUDATargetMismatch
@ TDK_CUDATargetMismatch
CUDA Target attributes do not match.
Definition: Sema.h:9005
clang::Sema::checkVarDeclRedefinition
bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn)
We've just determined that Old and New both appear to be definitions of the same variable.
Definition: SemaDecl.cpp:4805
clang::Sema::CompleteTypeKind::Default
@ Default
clang::Sema::ActOnOpenMPNumTasksClause
OMPClause * ActOnOpenMPNumTasksClause(OpenMPNumTasksClauseModifier Modifier, Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'num_tasks' clause.
Definition: SemaOpenMP.cpp:22594
clang::Sema::CheckConvertedConstantExpression
ExprResult CheckConvertedConstantExpression(Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
Definition: SemaOverload.cpp:5963
clang::Sema::DeclareImplicitCopyConstructor
CXXConstructorDecl * DeclareImplicitCopyConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit copy constructor for the given class.
Definition: SemaDeclCXX.cpp:15148
clang::Sema::LK_Array
@ LK_Array
Definition: Sema.h:3953
clang::Sema::POAK_Packed
@ POAK_Packed
Definition: Sema.h:10577
clang::Sema::ActOnStartOfCompoundStmt
void ActOnStartOfCompoundStmt(bool IsStmtExpr)
Definition: SemaStmt.cpp:389
clang::Sema::MSPragmaOptimizeIsOn
bool MSPragmaOptimizeIsOn
The "on" or "off" argument passed by #pragma optimize, that denotes whether the optimizations in the ...
Definition: Sema.h:774
clang::Sema::FriendConstraintsDependOnEnclosingTemplate
bool FriendConstraintsDependOnEnclosingTemplate(const FunctionDecl *FD)
Definition: SemaConcept.cpp:740
clang::Sema::ExtractUnqualifiedFunctionType
QualType ExtractUnqualifiedFunctionType(QualType PossiblyAFunctionType)
Definition: SemaOverload.cpp:12149
clang::Sema::SpecialMembersBeingDeclared
llvm::SmallPtrSet< SpecialMemberDecl, 4 > SpecialMembersBeingDeclared
The C++ special members which we are currently in the process of declaring.
Definition: Sema.h:1561
clang::Sema::ActOnPragmaDump
void ActOnPragmaDump(Scope *S, SourceLocation Loc, IdentifierInfo *II)
Called on #pragma clang __debug dump II.
Definition: SemaLookup.cpp:5874
clang::Sema::BuildUnaryTransformType
QualType BuildUnaryTransformType(QualType BaseType, UTTKind UKind, SourceLocation Loc)
Definition: SemaType.cpp:9507
clang::transformer::range
RangeSelector range(RangeSelector Begin, RangeSelector End)
DEPRECATED. Use enclose.
Definition: RangeSelector.h:41
clang::Sema::ActOnWhileStmt
StmtResult ActOnWhileStmt(SourceLocation WhileLoc, SourceLocation LParenLoc, ConditionResult Cond, SourceLocation RParenLoc, Stmt *Body)
Definition: SemaStmt.cpp:1684
clang::Sema::ActOnEnumBody
void ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, const ParsedAttributesView &Attr)
Definition: SemaDecl.cpp:19550
clang::OpenMPDistScheduleClauseKind
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
Definition: OpenMPKinds.h:103
clang::Sema::GlobalMethodPool
Definition: Sema.h:1510
clang::TypeResult
ActionResult< ParsedType > TypeResult
Definition: Ownership.h:264
clang::Sema::ActOnConditionVariable
ConditionResult ActOnConditionVariable(Decl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
Definition: SemaExprCXX.cpp:3977
clang::Sema::DiagnoseTemplateParameterShadow
void DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl)
DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevD...
Definition: SemaTemplate.cpp:888
clang::Sema::ExpressionEvaluationContextRecord::IsCurrentlyCheckingDefaultArgumentOrInitializer
bool IsCurrentlyCheckingDefaultArgumentOrInitializer
Definition: Sema.h:1339
clang::Sema::PSK_Pop
@ PSK_Pop
Definition: Sema.h:480
clang::Sema::OMPIteratorData::AssignLoc
SourceLocation AssignLoc
Definition: Sema.h:5757
clang::Sema::OriginalCallArg::OriginalArgType
QualType OriginalArgType
Definition: Sema.h:9039
clang::Sema::ActOnTagStartSkippedDefinition
SkippedDefinitionContext ActOnTagStartSkippedDefinition(Scope *S, Decl *TD)
Invoked when we enter a tag definition that we're skipping.
Definition: SemaDecl.cpp:1358
clang::Sema::areSameVectorElemTypes
bool areSameVectorElemTypes(QualType srcType, QualType destType)
Definition: SemaExpr.cpp:7993
clang::Sema::AllocationFunctionScope
AllocationFunctionScope
The scope in which to find allocation functions.
Definition: Sema.h:6748
clang::Sema::NamedReturnInfo::MoveEligibleAndCopyElidable
@ MoveEligibleAndCopyElidable
Definition: Sema.h:5170
clang::TPOC
TPOC
The context in which partial ordering of function templates occurs.
Definition: Template.h:267
clang::Sema::VerifyICEDiagnoser
Abstract base class used for diagnosing integer constant expression violations.
Definition: Sema.h:12892
clang::Sema::checkCommonAttributeFeatures
bool checkCommonAttributeFeatures(const Decl *D, const ParsedAttr &A, bool SkipArgCountCheck=false)
Handles semantic checking for features that are common to all attributes, such as checking whether a ...
Definition: SemaAttr.cpp:1457
clang::Sema::FST_Scanf
@ FST_Scanf
Definition: Sema.h:13566
clang::Sema::hasVisibleExplicitSpecialization
bool hasVisibleExplicitSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a visible declaration of D that is an explicit specialization declaration for a...
Definition: SemaLookup.cpp:1719
clang::Sema::ActOnDocumentableDecl
void ActOnDocumentableDecl(Decl *D)
Should be called on all declarations that might have attached documentation comments.
Definition: SemaDecl.cpp:14523
clang::Sema::isConstantEvaluatedContext
bool isConstantEvaluatedContext() const
Definition: Sema.h:9676
clang::Sema::ActOnOpenMPForSimdDirective
StmtResult ActOnOpenMPForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10366
clang::Sema::createLambdaInitCaptureVarDecl
VarDecl * createLambdaInitCaptureVarDecl(SourceLocation Loc, QualType InitCaptureType, SourceLocation EllipsisLoc, IdentifierInfo *Id, unsigned InitStyle, Expr *Init)
Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purpose...
Definition: SemaLambda.cpp:864
clang::Sema::LookupOrCreateLabel
LabelDecl * LookupOrCreateLabel(IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
LookupOrCreateLabel - Do a name lookup of a label with the specified name.
Definition: SemaLookup.cpp:4450
clang::Sema::CheckConstructorDeclarator
QualType CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructo...
Definition: SemaDeclCXX.cpp:10540
clang::Sema::AlignPackInfo::getPackNumber
unsigned getPackNumber() const
Definition: Sema.h:550
clang::Sema::ReadMethodPool
void ReadMethodPool(Selector Sel)
Read the contents of the method pool for a given selector from external storage.
Definition: SemaDeclObjC.cpp:3422
clang::Designation
Designation - Represent a full designation, which is a sequence of designators.
Definition: Designator.h:302
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:72
clang::PreferredTypeBuilder::enterTypeCast
void enterTypeCast(SourceLocation Tok, QualType CastType)
Handles all type casts, including C-style cast, C++ casts, etc.
Definition: SemaCodeComplete.cpp:596
clang::EST_BasicNoexcept
@ EST_BasicNoexcept
noexcept
Definition: ExceptionSpecificationType.h:26
clang::Sema::ReferenceConversionsScope::ObjC
@ ObjC
Definition: Sema.h:12675
clang::Sema::DiagnoseDeletedDefaultedFunction
void DiagnoseDeletedDefaultedFunction(FunctionDecl *FD)
Produce notes explaining why a defaulted function was defined as deleted.
Definition: SemaDeclCXX.cpp:9545
clang::Sema::BuildIfStmt
StmtResult BuildIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
Definition: SemaStmt.cpp:950
clang::Sema::ParseObjCProtocolExpression
ExprResult ParseObjCProtocolExpression(IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
ParseObjCProtocolExpression - Build protocol expression for @protocol.
Definition: SemaExprObjC.cpp:1384
clang::ObjCIvarDecl
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1939
clang::Sema::hasExplicitCallingConv
bool hasExplicitCallingConv(QualType T)
Definition: SemaType.cpp:7918
clang::Sema::PragmaAlignPackDiagnoseKind::NonDefaultStateAtInclude
@ NonDefaultStateAtInclude
clang::Sema::RegisterLocallyScopedExternCDecl
void RegisterLocallyScopedExternCDecl(NamedDecl *ND, Scope *S)
Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarat...
Definition: SemaDecl.cpp:6602
clang::Sema::SubstDefaultArgument
bool SubstDefaultArgument(SourceLocation Loc, ParmVarDecl *Param, const MultiLevelTemplateArgumentList &TemplateArgs, bool ForCallExpr=false)
Substitute the given template arguments into the default argument.
Definition: SemaTemplateInstantiate.cpp:2833
clang::Sema::ActOnOpenMPFinalClause
OMPClause * ActOnOpenMPFinalClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'final' clause.
Definition: SemaOpenMP.cpp:16294
clang::Sema::getObjCMessageKind
ObjCMessageKind getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
Definition: SemaExprObjC.cpp:2282
clang::Sema::getScopeForContext
Scope * getScopeForContext(DeclContext *Ctx)
Determines the active Scope associated with the given declaration context.
Definition: Sema.cpp:2098
clang::Sema::Incompatible
@ Incompatible
Incompatible - We reject this conversion outright, it is invalid to represent it in the AST.
Definition: Sema.h:12438
clang::Sema::SpecialMemberOverloadResult::Ambiguous
@ Ambiguous
Definition: Sema.h:1426
clang::Sema::TPL_TemplateTemplateArgumentMatch
@ TPL_TemplateTemplateArgumentMatch
We are matching the template parameter lists of a template template argument against the template par...
Definition: Sema.h:8432
clang::Sema::ActOnMSDependentExistsStmt
StmtResult ActOnMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name, Stmt *Nested)
Definition: SemaStmt.cpp:4623
clang::Sema::TUFragmentKind
TUFragmentKind
Definition: Sema.h:1936
clang::Sema::OMPIteratorData::Range
OMPIteratorExpr::IteratorRange Range
Definition: Sema.h:5756
clang::Sema::CompleteConstructorCall
bool CompleteConstructorCall(CXXConstructorDecl *Constructor, QualType DeclInitType, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr * > &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false)
Given a constructor and the set of arguments provided for the constructor, convert the arguments and ...
Definition: SemaDeclCXX.cpp:15733
clang::Sema::CheckUnresolvedLookupAccess
AccessResult CheckUnresolvedLookupAccess(UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
Definition: SemaAccess.cpp:1548
clang::Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction
void AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(FunctionDecl *FD)
If this function is a C++ replaceable global allocation function (C++2a [basic.stc....
Definition: SemaDecl.cpp:15990
clang::Sema::SizelessTypeDiagnoser
A derivative of BoundTypeDiagnoser for which the diagnostic's type parameter is preceded by a 0/1 enu...
Definition: Sema.h:2236
clang::Sema::ObjCSubscriptKind
ObjCSubscriptKind
Definition: Sema.h:3943
clang::Sema::isIncompatibleTypedef
bool isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New)
Definition: SemaDecl.cpp:2521
clang::Sema::ActOnExplicitBoolSpecifier
ExplicitSpecifier ActOnExplicitBoolSpecifier(Expr *E)
ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression found in an explicit(bool)...
Definition: SemaDeclCXX.cpp:13381
clang::Sema::LookupMovingAssignment
CXXMethodDecl * LookupMovingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the moving assignment operator for the given class.
Definition: SemaLookup.cpp:3610
clang::Sema::ActOnStartProtocolInterface
ObjCProtocolDecl * ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody)
Definition: SemaDeclObjC.cpp:1220
clang::Sema::buildLambdaScope
void buildLambdaScope(sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable)
Endow the lambda scope info with the relevant properties.
Definition: SemaLambda.cpp:491
clang::MSPropertyDecl
An instance of this class represents the declaration of a property member.
Definition: DeclCXX.h:4148
clang::Sema::adjustCCAndNoReturn
QualType adjustCCAndNoReturn(QualType ArgFunctionType, QualType FunctionType, bool AdjustExceptionSpec=false)
Adjust the type ArgFunctionType to match the calling convention, noreturn, and optionally the excepti...
Definition: SemaTemplateDeduction.cpp:4221
clang::Sema::SpecialMemberIsTrivial
bool SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH=TAH_IgnoreTrivialABI, bool Diagnose=false)
Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [c...
Definition: SemaDeclCXX.cpp:9842
clang::Sema::TypeTagData
Definition: Sema.h:13663
clang::Sema::PragmaClangSection::PragmaLocation
SourceLocation PragmaLocation
Definition: Sema.h:467
clang::Sema::IER_Exists
@ IER_Exists
The symbol exists.
Definition: Sema.h:6006
clang::Sema::CodeCompleter
CodeCompleteConsumer * CodeCompleter
Code-completion consumer.
Definition: Sema.h:418
clang::Sema::ActOnOpenMPParallelGenericLoopDirective
StmtResult ActOnOpenMPParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10674
clang::Sema::isOpenMPCapturedByRef
bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level, unsigned OpenMPCaptureLevel) const
Return true if the provided declaration VD should be captured by reference.
Definition: SemaOpenMP.cpp:2107
clang::Sema::BuildPseudoDestructorExpr
ExprResult BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
Definition: SemaExprCXX.cpp:7714
clang::Sema::PopSatisfactionStackEntry
void PopSatisfactionStackEntry()
Definition: Sema.h:7298
clang::Declarator
Information about one declarator, including the parsed type information and the identifier.
Definition: DeclSpec.h:1834
clang::Sema::AddOptnoneAttributeIfNoConflicts
void AddOptnoneAttributeIfNoConflicts(FunctionDecl *FD, SourceLocation Loc)
Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents th...
Definition: SemaAttr.cpp:1215
clang::Sema::CheckEnumUnderlyingType
bool CheckEnumUnderlyingType(TypeSourceInfo *TI)
Check that this is a valid underlying type for an enum declaration.
Definition: SemaDecl.cpp:16316
clang::Sema::translateTemplateArguments
void translateTemplateArguments(const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
Translates template arguments as provided by the parser into template arguments used by semantic anal...
Definition: SemaTemplate.cpp:960
clang::Sema::ActOnFriendFunctionDecl
NamedDecl * ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
Definition: SemaDeclCXX.cpp:17154
clang::threadSafety::threadSafetyCleanup
void threadSafetyCleanup(BeforeSet *Cache)
Definition: ThreadSafety.cpp:2503
clang::Sema::AlignPackInfo::getRawEncoding
static uint32_t getRawEncoding(const AlignPackInfo &Info)
Definition: Sema.h:517
clang::DeclaratorContext::Condition
@ Condition
clang::Sema::ExpressionEvaluationContextRecord
Data structure used to record current or nested expression evaluation contexts.
Definition: Sema.h:1280
clang::Sema::PragmaClangSectionKind
PragmaClangSectionKind
pragma clang section kind
Definition: Sema.h:450
clang::Sema::NestedNameSpecInfo::CCLoc
SourceLocation CCLoc
The location of the '::'.
Definition: Sema.h:6936
clang::Sema::CompleteVarTemplateSpecializationDecl
VarTemplateSpecializationDecl * CompleteVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiates a variable template specialization by completing it with appropriate type information an...
Definition: SemaTemplateInstantiateDecl.cpp:5161
clang::Sema::NTK_TypeAliasTemplate
@ NTK_TypeAliasTemplate
Definition: Sema.h:3294
clang::Sema::ActOnOpenMPMasterDirective
StmtResult ActOnOpenMPMasterDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp master' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10802
clang::LambdaCaptureInitKind::CopyInit
@ CopyInit
[a = b], [a = {b}]
clang::Sema::ActOnForEachLValueExpr
StmtResult ActOnForEachLValueExpr(Expr *E)
In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expressi...
Definition: SemaStmt.cpp:2193
CleanupInfo.h
clang::OpenMPScheduleClauseModifier
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
Definition: OpenMPKinds.h:38
clang::Sema::VerifyICEDiagnoser::diagnoseNotICE
virtual SemaDiagnosticBuilder diagnoseNotICE(Sema &S, SourceLocation Loc)=0
clang::Sema::diagnoseZeroToNullptrConversion
void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E)
Warn when implicitly casting 0 to nullptr.
Definition: Sema.cpp:580
clang::Sema::NamedReturnInfo::isMoveEligible
bool isMoveEligible() const
Definition: Sema.h:5173
clang::Sema::ActOnDefaultStmt
StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
Definition: SemaStmt.cpp:540
clang::Sema::ActOnOpenMPSeqCstClause
OMPClause * ActOnOpenMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'seq_cst' clause.
Definition: SemaOpenMP.cpp:17446
clang::Sema::getObjCDeclContext
ObjCContainerDecl * getObjCDeclContext() const
Definition: SemaDecl.cpp:19862
clang::Sema::ReplaceAutoTypeSourceInfo
TypeSourceInfo * ReplaceAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto, QualType Replacement)
Definition: SemaTemplateDeduction.cpp:4903
clang::prec::Level
Level
Definition: OperatorPrecedence.h:26
clang::Sema::IdentifyCUDAPreference
CUDAFunctionPreference IdentifyCUDAPreference(const FunctionDecl *Caller, const FunctionDecl *Callee)
Identifies relative preference of a given Caller/Callee combination, based on their host/device attri...
Definition: SemaCUDA.cpp:207
clang::Sema::BuildVAArgExpr
ExprResult BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc)
Definition: SemaExpr.cpp:16782
clang::Sema::DiagnoseTypeArgsAndProtocols
void DiagnoseTypeArgsAndProtocols(IdentifierInfo *ProtocolId, SourceLocation ProtocolLoc, IdentifierInfo *TypeArgId, SourceLocation TypeArgLoc, bool SelectProtocolFirst=false)
Definition: SemaDeclObjC.cpp:1416
clang::Sema::BuildCXXMemberCallExpr
ExprResult BuildCXXMemberCallExpr(Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
Definition: SemaExprCXX.cpp:8006
clang::Sema::getImplicitCodeSegOrSectionAttrForFunction
Attr * getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, bool IsDefinition)
Returns an implicit CodeSegAttr if a __declspec(code_seg) is found on a containing class.
Definition: SemaDecl.cpp:10768
clang::Sema::SpecialMemberOverloadResult::getKind
Kind getKind() const
Definition: Sema.h:1441
clang::Sema::FnBodyKind::Default
@ Default
= default ;
clang::Sema::CanUseDecl
bool CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid)
Determine whether the use of this declaration is valid, without emitting diagnostics.
Definition: SemaExpr.cpp:66
clang::Sema::ActOnOpenMPClause
OMPClause * ActOnOpenMPClause(OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:17257
clang::Sema::ActOnCXXThrow
ExprResult ActOnCXXThrow(Scope *S, SourceLocation OpLoc, Expr *expr)
ActOnCXXThrow - Parse throw expressions.
Definition: SemaExprCXX.cpp:826
clang::Sema::StartOpenMPClause
void StartOpenMPClause(OpenMPClauseKind K)
Start analysis of clauses.
Definition: SemaOpenMP.cpp:2760
clang::Sema::FunctionToSectionMap
llvm::StringMap< std::tuple< StringRef, SourceLocation > > FunctionToSectionMap
Sections used with #pragma alloc_text.
Definition: Sema.h:736
clang::Sema::ActOnPragmaWeakAlias
void ActOnPragmaWeakAlias(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
Definition: SemaDecl.cpp:19844
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2068
clang::Sema::EraseUnwantedCUDAMatches
void EraseUnwantedCUDAMatches(const FunctionDecl *Caller, SmallVectorImpl< std::pair< DeclAccessPair, FunctionDecl * >> &Matches)
Finds a function in Matches with highest calling priority from Caller context and erases all function...
Definition: SemaCUDA.cpp:272
clang::Sema::MarkUsedTemplateParameters
void MarkUsedTemplateParameters(const Expr *E, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
Mark which template parameters are used in a given expression.
Definition: SemaTemplateDeduction.cpp:6257
clang::FieldDeclarator
This little struct is used to capture information about structure field declarators,...
Definition: DeclSpec.h:2677
clang::Sema::getSpecialMember
CXXSpecialMember getSpecialMember(const CXXMethodDecl *MD)
Definition: Sema.h:3430
clang::Sema::isCompleteType
bool isCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind=CompleteTypeKind::Default)
Definition: Sema.h:2478
clang::FileID
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Definition: SourceLocation.h:38
clang::Sema::ProcessPropertyDecl
void ProcessPropertyDecl(ObjCPropertyDecl *property)
Process the specified property declaration and create decls for the setters and getters as needed.
Definition: SemaObjCProperty.cpp:2375
clang::Sema::AddCFAuditedAttribute
void AddCFAuditedAttribute(Decl *D)
AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and,...
Definition: SemaAttr.cpp:871
clang::Sema::CaptureHasSideEffects
bool CaptureHasSideEffects(const sema::Capture &From)
Does copying/destroying the captured variable have side effects?
Definition: SemaLambda.cpp:1697
clang::Sema::ActOnOpenMPTargetUpdateDirective
StmtResult ActOnOpenMPTargetUpdateDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target update'.
Definition: SemaOpenMP.cpp:13243
clang::Sema::FormatStringInfo::FormatIdx
unsigned FormatIdx
Definition: Sema.h:13411
clang::Sema::ActOnReturnStmt
StmtResult ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
Definition: SemaStmt.cpp:3880
clang::Sema::RequireCompleteSizedType
bool RequireCompleteSizedType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &... Args)
Definition: Sema.h:2503
clang::Sema::CodeCompletePreprocessorMacroName
void CodeCompletePreprocessorMacroName(bool IsDefinition)
Definition: SemaCodeComplete.cpp:9887
clang::Sema::RTC_Unknown
@ RTC_Unknown
Definition: Sema.h:10564
clang::SourceLocation::isValid
bool isValid() const
Return true if this is a valid SourceLocation object.
Definition: SourceLocation.h:110
clang::PreferredTypeBuilder::enterDesignatedInitializer
void enterDesignatedInitializer(SourceLocation Tok, QualType BaseType, const Designation &D)
Handles e.g. BaseType{ .D = Tok...
Definition: SemaCodeComplete.cpp:419
clang::Sema::PCC_Template
@ PCC_Template
Code completion occurs following one or more template headers.
Definition: Sema.h:13219
clang::CXXBaseSpecifier
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
clang::CorrectionCandidateCallback
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
Definition: TypoCorrection.h:281
clang::Sema::RestoreNestedNameSpecifierAnnotation
void RestoreNestedNameSpecifierAnnotation(void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
Definition: SemaCXXScopeSpec.cpp:1028
clang::Sema::getCallingConvAttributedType
const AttributedType * getCallingConvAttributedType(QualType T) const
Get the outermost AttributedType node that sets a calling convention.
Definition: SemaDecl.cpp:3484
clang::Sema::ActOnConceptDefinition
Decl * ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr)
Definition: SemaTemplate.cpp:8920
clang::Sema::NameClassification::Concept
static NameClassification Concept(TemplateName Name)
Definition: Sema.h:2728
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:40
clang::Sema::OriginalCallArg
brief A function argument from which we performed template argument
Definition: Sema.h:9029
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6606
clang::Sema::ActOnIntegerConstant
ExprResult ActOnIntegerConstant(SourceLocation Loc, uint64_t Val)
Definition: SemaExpr.cpp:3682
clang::Sema::TPC_ClassTemplate
@ TPC_ClassTemplate
Definition: Sema.h:8134
clang::Sema::ActOnMemberAccessExtraArgs
Definition: Sema.h:5771
clang::LocalInstantiationScope
A stack-allocated class that identifies which local variable declaration instantiations are present i...
Definition: Template.h:334
clang::Sema::SetMemberAccessSpecifier
bool SetMemberAccessSpecifier(NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
SetMemberAccessSpecifier - Set the access specifier of a member.
Definition: SemaAccess.cpp:39
clang::Sema::CheckOpenMPLinearDecl
bool CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type, bool IsDeclareSimd=false)
Checks that the specified declaration matches requirements for the linear decls.
Definition: SemaOpenMP.cpp:19897
clang::Sema::ActOnOpenMPEndDeclareVariant
void ActOnOpenMPEndDeclareVariant()
Handle a omp end declare variant.
Definition: SemaOpenMP.cpp:2688
clang::Sema::LookupConstructors
DeclContextLookupResult LookupConstructors(CXXRecordDecl *Class)
Look up the constructors for the given class.
Definition: SemaLookup.cpp:3574
clang::Sema::ActOnOpenMPDeclareReductionInitializerEnd
void ActOnOpenMPDeclareReductionInitializerEnd(Decl *D, Expr *Initializer, VarDecl *OmpPrivParm)
Finish current declare reduction construct initializer.
Definition: SemaOpenMP.cpp:22292
clang::Sema::UPPC_PartialSpecialization
@ UPPC_PartialSpecialization
Partial specialization.
Definition: Sema.h:8636
clang::Sema::DelegatingCtorDecls
DelegatingCtorDeclsType DelegatingCtorDecls
All the delegating constructors seen so far in the file, used for cycle detection at the end of the T...
Definition: Sema.h:901
clang::Sema::SFINAETrap::SFINAETrap
SFINAETrap(Sema &SemaRef, bool AccessCheckingSFINAE=false)
Definition: Sema.h:9740
clang::ConversionSequenceList
llvm::MutableArrayRef< ImplicitConversionSequence > ConversionSequenceList
A list of implicit conversion sequences for the arguments of an OverloadCandidate.
Definition: Overload.h:817
clang::OMPRequiresDecl
This represents '#pragma omp requires...' directive.
Definition: DeclOpenMP.h:416
clang::Sema::SubstNestedNameSpecifierLoc
NestedNameSpecifierLoc SubstNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3965
clang::Sema::checkIllFormedTrivialABIStruct
void checkIllFormedTrivialABIStruct(CXXRecordDecl &RD)
Check that the C++ class annoated with "trivial_abi" satisfies all the conditions that are needed for...
Definition: SemaDeclCXX.cpp:10130
clang::Sema::CheckConstraintSatisfaction
bool CheckConstraintSatisfaction(const NamedDecl *Template, ArrayRef< const Expr * > ConstraintExprs, const MultiLevelTemplateArgumentList &TemplateArgLists, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given...
Definition: Sema.h:7369
clang::Sema::BuildUsingPackDecl
NamedDecl * BuildUsingPackDecl(NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl * > Expansions)
Definition: SemaDeclCXX.cpp:12703
clang::Sema::lookupOpenMPDeclareTargetName
NamedDecl * lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
Searches for the provided declaration name for OpenMP declare target directive.
Definition: SemaOpenMP.cpp:22882
clang::Sema::checkOpenMPDeclareVariantFunction
std::optional< std::pair< FunctionDecl *, Expr * > > checkOpenMPDeclareVariantFunction(DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR)
Checks '#pragma omp declare variant' variant function and original functions after parsing of the ass...
Definition: SemaOpenMP.cpp:7362
clang::Sema::FilterUsingLookup
void FilterUsingLookup(Scope *S, LookupResult &lookup)
Remove decls we can't actually see from a lookup being used to declare shadow using decls.
Definition: SemaDeclCXX.cpp:12370
clang::Sema::ActOnFinishDelayedMemberDeclarations
void ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *Record)
Definition: SemaDeclCXX.cpp:10443
clang::Sema::ActOnStartCXXInClassMemberInitializer
void ActOnStartCXXInClassMemberInitializer()
Enter a new C++ default initializer scope.
Definition: SemaDeclCXX.cpp:4021
clang::Sema::CodeCompleteObjCForCollection
void CodeCompleteObjCForCollection(Scope *S, DeclGroupPtrTy IterationVar)
Definition: SemaCodeComplete.cpp:8292
clang::Sema::EvaluateImplicitExceptionSpec
void EvaluateImplicitExceptionSpec(SourceLocation Loc, FunctionDecl *FD)
Evaluate the implicit exception specification for a defaulted special member function.
Definition: SemaDeclCXX.cpp:7432
clang::Sema::ActOnCXXThis
ExprResult ActOnCXXThis(SourceLocation loc)
Definition: SemaExprCXX.cpp:1381
clang::Sema::MissingImportKind
MissingImportKind
Kinds of missing import.
Definition: Sema.h:3227
clang::Sema::PragmaPackInfo::Alignment
Token Alignment
Definition: Sema.h:489
clang::Sema::ActOnOpenMPDistributeParallelForDirective
StmtResult ActOnOpenMPDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for' after parsing of the associated statement...
Definition: SemaOpenMP.cpp:13904
clang::Sema::ActOnDefaultCtorInitializers
void ActOnDefaultCtorInitializers(Decl *CDtorDecl)
Definition: SemaDeclCXX.cpp:5795
clang::Sema::TemplateNameIsRequiredTag
TemplateNameIsRequiredTag
Definition: Sema.h:7987
clang::Sema::ActOnParenExpr
ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R, Expr *E)
Definition: SemaExpr.cpp:4164
clang::Sema::BumpAlloc
llvm::BumpPtrAllocator BumpAlloc
Definition: Sema.h:1471
clang::Sema::ExpressionEvaluationContextRecord::VolatileAssignmentLHSs
SmallVector< Expr *, 2 > VolatileAssignmentLHSs
Expressions appearing as the LHS of a volatile assignment in this context.
Definition: Sema.h:1319
clang::Sema::ParsingDeclState
DelayedDiagnosticsState ParsingDeclState
Definition: Sema.h:943
clang::Sema::CheckOMPThreadPrivateDecl
OMPThreadPrivateDecl * CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef< Expr * > VarList)
Builds a new OpenMPThreadPrivateDecl and checks its correctness.
Definition: SemaOpenMP.cpp:3194
clang::Sema::SetDeclDeleted
void SetDeclDeleted(Decl *dcl, SourceLocation DelLoc)
Definition: SemaDeclCXX.cpp:17470
clang::Sema::ActOnTagStartDefinition
void ActOnTagStartDefinition(Scope *S, Decl *TagDecl)
ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e....
Definition: SemaDecl.cpp:17567
unsigned
clang::Sema::OSMK_NonRetainingInit
@ OSMK_NonRetainingInit
Definition: Sema.h:10383
clang::Sema::NameClassification::Template
TemplateName Template
Definition: Sema.h:2671
clang::Sema::IgnoredValueConversions
ExprResult IgnoredValueConversions(Expr *E)
IgnoredValueConversions - Given that an expression's result is syntactically ignored,...
Definition: SemaExprCXX.cpp:8144
clang::Sema::DiagnoseCommaOperator
void DiagnoseCommaOperator(const Expr *LHS, SourceLocation Loc)
Definition: SemaExpr.cpp:14267
clang::Sema::BoundTypeDiagnoser
Definition: Sema.h:2195
clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated
bool isConstantEvaluated() const
Definition: Sema.h:1374
clang::Sema::PCSK_Relro
@ PCSK_Relro
Definition: Sema.h:456
clang::Sema::LateInstantiatedAttribute::NewDecl
Decl * NewDecl
Definition: Sema.h:10060
clang::Sema::ActOnAddrLabel
ExprResult ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
Definition: SemaExpr.cpp:16109
clang::Sema::checkNonTrivialCUnion
void checkNonTrivialCUnion(QualType QT, SourceLocation Loc, NonTrivialCUnionContext UseContext, unsigned NonTrivialKind)
Emit diagnostics if a non-trivial C union type or a struct that contains a non-trivial C union is use...
Definition: SemaDecl.cpp:12980
clang::Sema::adjustContextForLocalExternDecl
static bool adjustContextForLocalExternDecl(DeclContext *&DC)
Adjust the DeclContext for a function or variable that might be a function-local external declaration...
Definition: SemaDecl.cpp:7244
clang::Sema::ActOnFunctionDeclarator
NamedDecl * ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
Definition: SemaDecl.cpp:9576
clang::Sema::isUsualDeallocationFunction
bool isUsualDeallocationFunction(const CXXMethodDecl *FD)
Definition: SemaExprCXX.cpp:1616
clang::Sema::CompleteTypeKind::Normal
@ Normal
Apply the normal rules for complete types.
clang::Sema::CodeSynthesisContext::BuildingBuiltinDumpStructCall
@ BuildingBuiltinDumpStructCall
We are building an implied call from __builtin_dump_struct.
Definition: Sema.h:9285
clang::Sema::ActOnCondition
ConditionResult ActOnCondition(Scope *S, SourceLocation Loc, Expr *SubExpr, ConditionKind CK, bool MissingOK=false)
Definition: SemaExpr.cpp:20390
clang::Sema::UPPC_EnumeratorValue
@ UPPC_EnumeratorValue
The enumerator value.
Definition: Sema.h:8612
clang::Sema::StdNamespace
LazyDeclPtr StdNamespace
The C++ "std" namespace, where the standard library resides.
Definition: Sema.h:1136
clang::Sema::ActOnOpenMPTaskwaitDirective
StmtResult ActOnOpenMPTaskwaitDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskwait'.
Definition: SemaOpenMP.cpp:11146
clang::Sema::PushCompoundScope
void PushCompoundScope(bool IsStmtExpr)
Definition: Sema.cpp:2265
clang::Sema::ForceDeclarationOfImplicitMembers
void ForceDeclarationOfImplicitMembers(CXXRecordDecl *Class)
Force the declaration of any implicitly-declared members of this class.
Definition: SemaLookup.cpp:993
clang::Sema::CreateGenericSelectionExpr
ExprResult CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
Definition: SemaExpr.cpp:1636
clang::Sema::NameClassificationKind
NameClassificationKind
Describes the result of the name lookup and resolution performed by ClassifyName().
Definition: Sema.h:2627
clang::sema::CapturingScopeInfo
Definition: ScopeInfo.h:669
clang::Sema::IncompatiblePointerDiscardsQualifiers
@ IncompatiblePointerDiscardsQualifiers
IncompatiblePointerDiscardsQualifiers - The assignment discards qualifiers that we don't permit to be...
Definition: Sema.h:12401
clang::Sema::AllowedExplicit
AllowedExplicit
Definition: Sema.h:3768
clang::Sema::BuildModuleInclude
void BuildModuleInclude(SourceLocation DirectiveLoc, Module *Mod)
Definition: SemaModule.cpp:618
clang::Sema::ActOnOpenMPTaskLoopDirective
StmtResult ActOnOpenMPTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13363
clang::Sema::LookupInSuper
bool LookupInSuper(LookupResult &R, CXXRecordDecl *Class)
Perform qualified name lookup into all base classes of the given class.
Definition: SemaLookup.cpp:2759
clang::Sema::CollectIvarsToConstructOrDestruct
void CollectIvarsToConstructOrDestruct(ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.
Definition: SemaDeclObjC.cpp:5244
clang::MSInheritanceModel
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
Definition: Specifiers.h:374
clang::Sema::ActOnMemInitializer
MemInitResult ActOnMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
Handle a C++ member initializer using parentheses syntax.
Definition: SemaDeclCXX.cpp:4182
clang::InitializedEntity
Describes an entity that is being initialized.
Definition: Initialization.h:47
clang::ComparisonCategoryType::PartialOrdering
@ PartialOrdering
clang::Sema::LookupInlineAsmVarDeclField
ExprResult LookupInlineAsmVarDeclField(Expr *RefExpr, StringRef Member, SourceLocation AsmLoc)
Definition: SemaStmtAsm.cpp:890
clang::Sema::ActOnOpenMPHintClause
OMPClause * ActOnOpenMPHintClause(Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'hint' clause.
Definition: SemaOpenMP.cpp:22627
clang::Sema::ActOnCapturedRegionStart
void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams)
Definition: SemaStmt.cpp:4701
clang::Sema::OptimizeOffPragmaLocation
SourceLocation OptimizeOffPragmaLocation
This represents the last location of a "#pragma clang optimize off" directive if such a directive has...
Definition: Sema.h:767
clang::Sema::ActOnConversionDeclarator
Decl * ActOnConversionDeclarator(CXXConversionDecl *Conversion)
ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ co...
Definition: SemaDeclCXX.cpp:10982
clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship
@ RewritingOperatorAsSpaceship
We are rewriting a comparison operator in terms of an operator<=>.
Definition: Sema.h:9275
clang::Sema::ExitDeclaratorContext
void ExitDeclaratorContext(Scope *S)
Definition: SemaDecl.cpp:1414
clang::Sema::ActOnTopLevelStmtDecl
Decl * ActOnTopLevelStmtDecl(Stmt *Statement)
Definition: SemaDecl.cpp:19799
clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII
CXXThisScopeRAII(Sema &S, Decl *ContextDecl, Qualifiers CXXThisTypeQuals, bool Enabled=true)
Introduce a new scope where 'this' may be allowed (when enabled), using the given declaration (which ...
Definition: SemaExprCXX.cpp:1221
clang::Sema::BuildCXXNoexceptExpr
ExprResult BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
Definition: SemaExprCXX.cpp:8068
clang::TypedefNameDecl
Base class for declarations which introduce a typedef-name.
Definition: Decl.h:3288
clang::PragmaMSStructKind
PragmaMSStructKind
Definition: PragmaKinds.h:23
clang::Sema::FunctionScopeRAII::S
Sema & S
Definition: Sema.h:5047
clang::Sema::TemplateParameterListEqualKind
TemplateParameterListEqualKind
Enumeration describing how template parameter lists are compared for equality.
Definition: Sema.h:8403
clang::Sema::ModuleImportState::PrivateFragmentImportAllowed
@ PrivateFragmentImportAllowed
after 'module :private;' but before any non-import decl.
clang::Sema::UPPC_BaseType
@ UPPC_BaseType
The base type of a class type.
Definition: Sema.h:8594
clang::Sema::BuildTemplateIdExpr
ExprResult BuildTemplateIdExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:4906
clang::Sema::AlignPackStack
PragmaStack< AlignPackInfo > AlignPackStack
Definition: Sema.h:686
clang::Sema::OCK_Implementation
@ OCK_Implementation
Definition: Sema.h:10178
clang::Sema::AcceptableKind::Reachable
@ Reachable
clang::CodeCompletionAllocator
An allocator used specifically for the purpose of code completion.
Definition: CodeCompleteConsumer.h:641
clang::Sema::SubstType
TypeSourceInfo * SubstType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, bool AllowDeducedTST=false)
Perform substitution on the type T with a given set of template arguments.
Definition: SemaTemplateInstantiate.cpp:2411
clang::Sema::getTypeName
ParsedType getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=nullptr, bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, bool IsClassTemplateDeductionContext=true, ImplicitTypenameContext AllowImplicitTypename=ImplicitTypenameContext::No, IdentifierInfo **CorrectedII=nullptr)
If the identifier refers to a type name within this scope, return the declaration of that type.
Definition: SemaDecl.cpp:328
clang::Sema::ConvertParamDefaultArgument
ExprResult ConvertParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
Definition: SemaDeclCXX.cpp:272
DarwinSDKInfo.h
clang::Sema::RTC_Compatible
@ RTC_Compatible
Definition: Sema.h:10562
clang::Sema::ProcessDeclAttributeOptions::WithIncludeCXX11Attributes
ProcessDeclAttributeOptions WithIncludeCXX11Attributes(bool Val)
Definition: Sema.h:4644
clang::Sema::findFailedBooleanCondition
std::pair< Expr *, std::string > findFailedBooleanCondition(Expr *Cond)
Find the failed Boolean condition within a given Boolean constant expression, and describe it with a ...
Definition: SemaTemplate.cpp:3775
clang::Sema::LateInstantiatedAttrVec
SmallVector< LateInstantiatedAttribute, 16 > LateInstantiatedAttrVec
Definition: Sema.h:10067
clang::Sema::AMK_ProtocolImplementation
@ AMK_ProtocolImplementation
Merge availability attributes for an implementation of a protocol requirement.
Definition: Sema.h:3603
clang::Sema::ActOnParamUnparsedDefaultArgument
void ActOnParamUnparsedDefaultArgument(Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter,...
Definition: SemaDeclCXX.cpp:377
clang::Sema::FinishCXXForRangeStmt
StmtResult FinishCXXForRangeStmt(Stmt *ForRange, Stmt *Body)
FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement.
Definition: SemaStmt.cpp:3264
clang::Sema::ActOnStartRequiresExpr
RequiresExprBodyDecl * ActOnStartRequiresExpr(SourceLocation RequiresKWLoc, ArrayRef< ParmVarDecl * > LocalParameters, Scope *BodyScope)
Definition: SemaExprCXX.cpp:9101
clang::Sema::NTK_TypeAlias
@ NTK_TypeAlias
Definition: Sema.h:3292
clang::Sema::ActOnOpenMPSingleDirective
StmtResult ActOnOpenMPSingleDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp single' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10771
clang::Sema::isObjCPointerConversion
bool isObjCPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.
Definition: SemaOverload.cpp:2612
clang::ObjCContainerDecl
ObjCContainerDecl - Represents a container for method declarations.
Definition: DeclObjC.h:941
clang::Sema::isMemberAccessibleForDeletion
bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType, SourceLocation Loc, const PartialDiagnostic &Diag)
Is the given member accessible for the purposes of deciding whether to define a special member functi...
Definition: SemaAccess.cpp:1583
clang::Sema::BuildUnaryOp
ExprResult BuildUnaryOp(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input, bool IsAfterAmp=false)
Definition: SemaExpr.cpp:16057
clang::DeclContextLookupResult
The results of name lookup within a DeclContext.
Definition: DeclBase.h:1334
clang::Sema::CurrentCUDATarget
CUDAFunctionTarget CurrentCUDATarget()
Gets the CUDA target for the current context.
Definition: Sema.h:13075
clang::Sema::IncompatibleVectors
@ IncompatibleVectors
IncompatibleVectors - The assignment is between two vector types that have the same size,...
Definition: Sema.h:12417
clang::Sema::BuiltinDecay
QualType BuiltinDecay(QualType BaseType, SourceLocation Loc)
Definition: SemaType.cpp:9360
clang::Sema::hasAcceptableDefaultArgument
bool hasAcceptableDefaultArgument(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules, Sema::AcceptableKind Kind)
Determine if the template parameter D has a reachable default argument.
Definition: SemaLookup.cpp:1645
clang::Sema::CreateBuiltinArraySubscriptExpr
ExprResult CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
Definition: SemaExpr.cpp:5646
clang::Sema::getCudaConfigureFuncName
std::string getCudaConfigureFuncName() const
Returns the name of the launch configuration function.
Definition: SemaCUDA.cpp:950
clang::Sema::CheckTypedefForVariablyModifiedType
void CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *D)
Definition: SemaDecl.cpp:6684
clang::Sema::TDK_Success
@ TDK_Success
Template argument deduction was successful.
Definition: Sema.h:8955
clang::Sema::diagnoseArgDependentDiagnoseIfAttrs
bool diagnoseArgDependentDiagnoseIfAttrs(const FunctionDecl *Function, const Expr *ThisArg, ArrayRef< const Expr * > Args, SourceLocation Loc)
Emit diagnostics for the diagnose_if attributes on Function, ignoring any non-ArgDependent DiagnoseIf...
Definition: SemaOverload.cpp:6896
clang::Sema::ContextualImplicitConverter::~ContextualImplicitConverter
virtual ~ContextualImplicitConverter()
Definition: Sema.h:3912
clang::Sema::RequiredTemplateKind
Whether and why a template name is required in this lookup.
Definition: Sema.h:7989
clang::Sema::PragmaStack::DefaultValue
ValueType DefaultValue
Definition: Sema.h:670
clang::Sema::MaxAlignmentExponent
static const unsigned MaxAlignmentExponent
The maximum alignment, same as in llvm::Value.
Definition: Sema.h:397
clang::Sema::ActOnSizeofParameterPackExpr
ExprResult ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc)
Called when an expression computing the size of a parameter pack is parsed.
Definition: SemaTemplateVariadic.cpp:1013
clang::Sema::ActOnOpenMPNumThreadsClause
OMPClause * ActOnOpenMPNumThreadsClause(Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_threads' clause.
Definition: SemaOpenMP.cpp:16411
clang::Sema::PushUsingDirective
void PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir)
Definition: SemaDeclCXX.cpp:11826
clang::TU_Complete
@ TU_Complete
The translation unit is a complete translation unit.
Definition: LangOptions.h:919
clang::Sema::IsBuildingRecoveryCallExpr
bool IsBuildingRecoveryCallExpr
Flag indicating if Sema is building a recovery call expression.
Definition: Sema.h:783
clang::Sema::ParseTypedefDecl
TypedefDecl * ParseTypedefDecl(Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
Subroutines of ActOnDeclarator().
Definition: SemaDecl.cpp:16259
clang::Sema::mergeEnforceTCBLeafAttr
EnforceTCBLeafAttr * mergeEnforceTCBLeafAttr(Decl *D, const EnforceTCBLeafAttr &AL)
Definition: SemaDeclAttr.cpp:8536
clang::Sema::WeakUndeclaredIdentifiers
llvm::MapVector< IdentifierInfo *, llvm::SetVector< WeakInfo, llvm::SmallVector< WeakInfo, 1u >, llvm::SmallDenseSet< WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly > > > WeakUndeclaredIdentifiers
WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.
Definition: Sema.h:1109
clang::Sema::AdjustDeclIfTemplate
TemplateDecl * AdjustDeclIfTemplate(Decl *&Decl)
AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference...
Definition: SemaTemplate.cpp:905
clang::Sema::AlignPackInfo::getAlignMode
Mode getAlignMode() const
Definition: Sema.h:548
clang::Sema::OpenCLFeatures
OpenCLOptions OpenCLFeatures
Definition: Sema.h:404
clang::Sema::handleTagNumbering
void handleTagNumbering(const TagDecl *Tag, Scope *TagScope)
Definition: SemaDecl.cpp:4852
clang::MemberExpr
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:3172
clang::Sema::RTC_Incompatible
@ RTC_Incompatible
Definition: Sema.h:10563
clang::TypeLoc::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
Definition: TypeLoc.h:152
clang::CXXBasePaths
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
Definition: CXXInheritance.h:117
clang::Sema::CodeCompletePreprocessorMacroArgument
void CodeCompletePreprocessorMacroArgument(Scope *S, IdentifierInfo *Macro, MacroInfo *MacroInfo, unsigned Argument)
Definition: SemaCodeComplete.cpp:9938
clang::ConstraintSatisfaction
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Definition: ASTConcept.h:28
clang::Sema::LOLR_Raw
@ LOLR_Raw
The lookup found a single 'raw' literal operator, which expects a string literal containing the spell...
Definition: Sema.h:4373
clang::Sema::ActOnMSAsmStmt
StmtResult ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc)
Definition: SemaStmtAsm.cpp:930
clang::Sema::PCC_LocalDeclarationSpecifiers
@ PCC_LocalDeclarationSpecifiers
Code completion occurs within a sequence of declaration specifiers within a function,...
Definition: Sema.h:13245
clang::Sema::ObjCArgInfo::DeclSpec
ObjCDeclSpec DeclSpec
Definition: Sema.h:10392
clang::Sema::UPPC_FixedUnderlyingType
@ UPPC_FixedUnderlyingType
The fixed underlying type of an enumeration.
Definition: Sema.h:8609
clang::Sema::ActOnOpenMPSimdlenClause
OMPClause * ActOnOpenMPSimdlenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'simdlen' clause.
Definition: SemaOpenMP.cpp:16499
clang::Sema::SetLateTemplateParser
void SetLateTemplateParser(LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
Definition: Sema.h:929
clang::Sema::CheckFriendTypeDecl
FriendDecl * CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
Perform semantic analysis of the given friend type declaration.
Definition: SemaDeclCXX.cpp:16858
clang::Sema::POAK_Mac68k
@ POAK_Mac68k
Definition: Sema.h:10579
clang::InClassInitStyle
InClassInitStyle
In-class initialization styles for non-static data members.
Definition: Specifiers.h:259
clang::Sema::CheckBaseSpecifier
CXXBaseSpecifier * CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
ActOnBaseSpecifier - Parsed a base specifier.
Definition: SemaDeclCXX.cpp:2533
clang::Sema::ContextualImplicitConverter::diagnoseIncomplete
virtual SemaDiagnosticBuilder diagnoseIncomplete(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic when the expression has incomplete class type.
clang::Sema::isUnexpandedParameterPackPermitted
bool isUnexpandedParameterPackPermitted()
Determine whether an unexpanded parameter pack might be permitted in this location.
Definition: SemaTemplateVariadic.cpp:298
clang::Sema::NoteDeletedInheritingConstructor
void NoteDeletedInheritingConstructor(CXXConstructorDecl *CD)
Definition: SemaDeclCXX.cpp:13715
clang::Sema::MissingImportKind::Definition
@ Definition
clang::Sema::ActOnOMPArrayShapingExpr
ExprResult ActOnOMPArrayShapingExpr(Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef< Expr * > Dims, ArrayRef< SourceRange > Brackets)
Definition: SemaExpr.cpp:5279
clang::Sema::ProduceConstructorSignatureHelp
QualType ProduceConstructorSignatureHelp(QualType Type, SourceLocation Loc, ArrayRef< Expr * > Args, SourceLocation OpenParLoc, bool Braced)
Definition: SemaCodeComplete.cpp:6263
clang::Sema::IsInsideALocalClassWithinATemplateFunction
bool IsInsideALocalClassWithinATemplateFunction()
Definition: SemaTemplate.cpp:11330
clang::Sema::ActOnCXXMemberDeclarator
NamedDecl * ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.
Definition: SemaDeclCXX.cpp:3300
clang::Sema::ProcessAccessDeclAttributeList
bool ProcessAccessDeclAttributeList(AccessSpecDecl *ASDecl, const ParsedAttributesView &AttrList)
Definition: SemaDeclAttr.cpp:9455
clang::OpenMPDirectiveKind
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
Definition: OpenMPKinds.h:24
clang::Sema::checkUnknownAnyCast
ExprResult checkUnknownAnyCast(SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
Check a cast of an unknown-any type.
Definition: SemaExpr.cpp:20855
clang::Sema::popObjCTypeParamList
void popObjCTypeParamList(Scope *S, ObjCTypeParamList *typeParamList)
Definition: SemaDeclObjC.cpp:805
clang::Sema::UPPC_DeclarationQualifier
@ UPPC_DeclarationQualifier
A declaration qualifier.
Definition: Sema.h:8621
clang::Sema::ModifyFnAttributesMSPragmaOptimize
void ModifyFnAttributesMSPragmaOptimize(FunctionDecl *FD)
Only called on function definitions; if there is a MSVC #pragma optimize in scope,...
Definition: SemaAttr.cpp:1208
clang::Sema::RequireCompleteEnumDecl
bool RequireCompleteEnumDecl(EnumDecl *D, SourceLocation L, CXXScopeSpec *SS=nullptr)
Require that the EnumDecl is completed with its enumerators defined or instantiated.
Definition: SemaCXXScopeSpec.cpp:241
clang::Sema::ACK_Comparison
@ ACK_Comparison
A comparison.
Definition: Sema.h:12337
clang::Sema::ARCConversionResult
ARCConversionResult
Definition: Sema.h:12731
clang::Sema::DiagnoseUnusedParameters
void DiagnoseUnusedParameters(ArrayRef< ParmVarDecl * > Parameters)
Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
Definition: SemaDecl.cpp:14719
clang::Sema::buildCoroutinePromise
VarDecl * buildCoroutinePromise(SourceLocation Loc)
Definition: SemaCoroutine.cpp:481
clang::Sema::LookupObjCImplicitSelfParam
@ LookupObjCImplicitSelfParam
Look up implicit 'self' parameter of an objective-c method.
Definition: Sema.h:4327
clang::Sema::CodeCompleteBracketDeclarator
void CodeCompleteBracketDeclarator(Scope *S)
Definition: SemaCodeComplete.cpp:5893
clang::Sema::NTCUK_Copy
@ NTCUK_Copy
Definition: Sema.h:3022
clang::Sema::PragmaAttributeGroup
A push'd group of PragmaAttributeEntries.
Definition: Sema.h:750
clang::Sema::ShouldWarnIfUnusedFileScopedDecl
bool ShouldWarnIfUnusedFileScopedDecl(const DeclaratorDecl *D) const
Definition: SemaDecl.cpp:1885
clang::Sema::PragmaAlignPackDiagnoseKind
PragmaAlignPackDiagnoseKind
Definition: Sema.h:10596
clang::Sema::ActOnPragmaMSPointersToMembers
void ActOnPragmaMSPointersToMembers(LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation met...
Definition: SemaAttr.cpp:622
clang::CanonicalDeclPtr
A wrapper class around a pointer that always points to its canonical declaration.
Definition: Redeclarable.h:349
clang::Sema::LocalEagerInstantiationScope::~LocalEagerInstantiationScope
~LocalEagerInstantiationScope()
Definition: Sema.h:9893
clang::Sema::diagnoseMissingTemplateArguments
void diagnoseMissingTemplateArguments(TemplateName Name, SourceLocation Loc)
Definition: SemaTemplate.cpp:4849
clang::Sema::ActOnAbortSEHFinallyBlock
void ActOnAbortSEHFinallyBlock()
Definition: SemaStmt.cpp:4589
clang::Sema::getOrCreateStdNamespace
NamespaceDecl * getOrCreateStdNamespace()
Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
Definition: SemaDeclCXX.cpp:11543
clang::Sema::ExpressionEvaluationContextRecord::InImmediateFunctionContext
bool InImmediateFunctionContext
Definition: Sema.h:1337
clang::Sema::DefaultedFunctionKind::asComparison
DefaultedComparisonKind asComparison() const
Definition: Sema.h:3416
clang::Expr::Classification
The return type of classify().
Definition: Expr.h:325
clang::CharUnits
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
clang::Sema::getDarwinSDKInfoForAvailabilityChecking
DarwinSDKInfo * getDarwinSDKInfoForAvailabilityChecking()
Definition: Sema.cpp:75
clang::Sema::setFunctionHasBranchIntoScope
void setFunctionHasBranchIntoScope()
Definition: Sema.cpp:2283
clang::Sema::CurrentSEHFinally
SmallVector< Scope *, 2 > CurrentSEHFinally
Stack of active SEH __finally scopes. Can be empty.
Definition: Sema.h:438
clang::Sema::AllowFold
@ AllowFold
Definition: Sema.h:12908
clang::Sema::ActOnPragmaMSOptimize
void ActOnPragmaMSOptimize(SourceLocation Loc, bool IsOn)
#pragma optimize("[optimization-list]", on | off).
Definition: SemaAttr.cpp:1166
clang::Sema::LookupSpecialMember
SpecialMemberOverloadResult LookupSpecialMember(CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
Definition: SemaLookup.cpp:3323
clang::Sema::isImplicitlyDeleted
bool isImplicitlyDeleted(FunctionDecl *FD)
Determine whether the given function is an implicitly-deleted special member function.
Definition: SemaDeclCXX.cpp:15423
clang::Sema::DiagnoseUnusedDecl
void DiagnoseUnusedDecl(const NamedDecl *ND)
Definition: SemaDecl.cpp:2114
clang::Sema::MarkDeclarationsReferencedInType
void MarkDeclarationsReferencedInType(SourceLocation Loc, QualType T)
Mark all of the declarations referenced within a particular AST node as referenced.
Definition: SemaExpr.cpp:20084
clang::Sema::StdExperimentalNamespaceCache
NamespaceDecl * StdExperimentalNamespaceCache
The C++ "std::experimental" namespace, where the experimental parts of the standard library resides.
Definition: Sema.h:1148
clang::Sema::CheckAttrTarget
bool CheckAttrTarget(const ParsedAttr &CurrAttr)
Definition: SemaDeclAttr.cpp:2218
clang::Sema::isAcceptable
bool isAcceptable(const NamedDecl *D, AcceptableKind Kind)
Determine whether a declaration is acceptable (visible/reachable).
Definition: Sema.h:2376
clang::Sema::inheritCUDATargetAttrs
void inheritCUDATargetAttrs(FunctionDecl *FD, const FunctionTemplateDecl &TD)
Copies target attributes from the template TD to the function FD.
Definition: SemaCUDA.cpp:942
clang::Sema::MarkVariableReferenced
void MarkVariableReferenced(SourceLocation Loc, VarDecl *Var)
Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2,...
Definition: SemaExpr.cpp:19931
clang::Sema::CXXSpecialMember
CXXSpecialMember
Kinds of C++ special members.
Definition: Sema.h:1545
clang::Sema::startLambdaDefinition
CXXMethodDecl * startLambdaDefinition(CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl * > Params, ConstexprSpecKind ConstexprKind, StorageClass SC, Expr *TrailingRequiresClause)
Start the definition of a lambda expression.
Definition: SemaLambda.cpp:367
clang::Sema::ActOnOpenMPParallelMaskedDirective
StmtResult ActOnOpenMPParallelMaskedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel masked' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10993
clang::Sema::ActOnStartClassImplementation
ObjCImplementationDecl * ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclObjC.cpp:1982
clang::Sema::checkAndRewriteMustTailAttr
bool checkAndRewriteMustTailAttr(Stmt *St, const Attr &MTA)
Check whether the given statement can have musttail applied to it, issuing a diagnostic and returning...
Definition: SemaStmt.cpp:611
clang::Sema::CheckVariableDeclaration
bool CheckVariableDeclaration(VarDecl *NewVD, LookupResult &Previous)
Perform semantic checking on a newly-created variable declaration.
Definition: SemaDecl.cpp:8721
clang::Sema::DeclareTargetContextInfo::MapInfo
Definition: Sema.h:10927
clang::Sema::BuiltinRemoveExtent
QualType BuiltinRemoveExtent(QualType BaseType, UTTKind UKind, SourceLocation Loc)
Definition: SemaType.cpp:9388
clang::Sema::ActOnOpenMPDeclareReductionCombinerEnd
void ActOnOpenMPDeclareReductionCombinerEnd(Decl *D, Expr *Combiner)
Finish current declare reduction construct initializer.
Definition: SemaOpenMP.cpp:22231
clang::Sema::DiagnoseUnsatisfiedConstraint
void DiagnoseUnsatisfiedConstraint(const ConstraintSatisfaction &Satisfaction, bool First=true)
Emit diagnostics explaining why a constraint expression was deemed unsatisfied.
Definition: SemaConcept.cpp:1061
clang::Sema::getNonOdrUseReasonInCurrentContext
NonOdrUseReason getNonOdrUseReasonInCurrentContext(ValueDecl *D)
If D cannot be odr-used in the current expression evaluation context, return a reason explaining why.
Definition: SemaExpr.cpp:2049
clang::Sema::TPL_TemplateMatch
@ TPL_TemplateMatch
We are matching the template parameter lists of two templates that might be redeclarations.
Definition: Sema.h:8411
clang::Sema::AddAlignedAttr
void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion)
AddAlignedAttr - Adds an aligned attribute to a particular declaration.
Definition: SemaDeclAttr.cpp:4357
clang::Sema::PragmaClangDataSection
PragmaClangSection PragmaClangDataSection
Definition: Sema.h:471
clang::Sema::CheckEnumConstant
EnumConstantDecl * CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val)
Definition: SemaDecl.cpp:19091
clang::Sema::BuildBaseInitializer
MemInitResult BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
Definition: SemaDeclCXX.cpp:4574
clang::Sema::ActOnTemplateTypeArgument
ParsedTemplateArgument ActOnTemplateTypeArgument(TypeResult ParsedType)
Convert a parsed type into a parsed template argument.
Definition: SemaTemplate.cpp:980
clang::PragmaMSCommentKind
PragmaMSCommentKind
Definition: PragmaKinds.h:14
clang::Sema::ActOnOpenMPAssumesDirective
void ActOnOpenMPAssumesDirective(SourceLocation Loc, OpenMPDirectiveKind DKind, ArrayRef< std::string > Assumptions, bool SkippedClauses)
Called on well-formed '#pragma omp [begin] assume[s]'.
Definition: SemaOpenMP.cpp:3466
clang::Sema::InstantiateClassTemplateSpecialization
bool InstantiateClassTemplateSpecialization(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
Definition: SemaTemplateInstantiate.cpp:3625
clang::Sema::CheckCompleteDecompositionDeclaration
void CheckCompleteDecompositionDeclaration(DecompositionDecl *DD)
Definition: SemaDeclCXX.cpp:1504
clang::APValue
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Definition: APValue.h:122
clang::Sema::TPC_FriendFunctionTemplateDefinition
@ TPC_FriendFunctionTemplateDefinition
Definition: Sema.h:8140
clang::Sema::ActOnOpenMPTaskDirective
StmtResult ActOnOpenMPTaskDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp task' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:11078
clang::Sema::GatherGlobalCodeCompletions
void GatherGlobalCodeCompletions(CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, SmallVectorImpl< CodeCompletionResult > &Results)
Definition: SemaCodeComplete.cpp:10116
clang::Sema::isAbstractType
bool isAbstractType(SourceLocation Loc, QualType T)
Definition: SemaDeclCXX.cpp:5806
clang::Sema::CodeCompleteObjCPropertyDefinition
void CodeCompleteObjCPropertyDefinition(Scope *S)
Definition: SemaCodeComplete.cpp:8585
clang::Sema::DeferDiagsRAII::DeferDiagsRAII
DeferDiagsRAII(Sema &S, bool DeferDiags)
Definition: Sema.h:1896
clang::Sema::LookupOrdinaryName
@ LookupOrdinaryName
Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc....
Definition: Sema.h:4288
clang::Sema::UPPC_DefaultArgument
@ UPPC_DefaultArgument
A default argument.
Definition: Sema.h:8627
clang::Sema::AlignPackIncludeState
Definition: Sema.h:688
clang::TNK_Concept_template
@ TNK_Concept_template
The name refers to a concept.
Definition: TemplateKinds.h:52
clang::Sema::ActOnOpenMPDeclareSimdDirective
DeclGroupPtrTy ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef< Expr * > Uniforms, ArrayRef< Expr * > Aligneds, ArrayRef< Expr * > Alignments, ArrayRef< Expr * > Linears, ArrayRef< unsigned > LinModifiers, ArrayRef< Expr * > Steps, SourceRange SR)
Called on well-formed '#pragma omp declare simd' after parsing of the associated method/function.
Definition: SemaOpenMP.cpp:6839
clang::Sema::CXXCopyAssignment
@ CXXCopyAssignment
Definition: Sema.h:1549
clang::Sema::BuildSYCLUniqueStableNameExpr
ExprResult BuildSYCLUniqueStableNameExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, TypeSourceInfo *TSI)
Definition: SemaExpr.cpp:3583
clang::Sema::NTCUC_CompoundLiteral
@ NTCUC_CompoundLiteral
Definition: Sema.h:3005
clang::Sema::SubstDefaultTemplateArgumentIfAvailable
TemplateArgumentLoc SubstDefaultTemplateArgumentIfAvailable(TemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Decl *Param, ArrayRef< TemplateArgument > SugaredConverted, ArrayRef< TemplateArgument > CanonicalConverted, bool &HasDefaultArg)
If the given template parameter has a default template argument, substitute into that default templat...
Definition: SemaTemplate.cpp:5421
clang::Sema::IncompatibleNestedPointerQualifiers
@ IncompatibleNestedPointerQualifiers
IncompatibleNestedPointerQualifiers - The assignment is between two nested pointer types,...
Definition: Sema.h:12413
clang::Sema::NSNumberLiteralMethods
ObjCMethodDecl * NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods]
The Objective-C NSNumber methods used to create NSNumber literals.
Definition: Sema.h:1188
clang::Sema::TDK_TooFewArguments
@ TDK_TooFewArguments
When performing template argument deduction for a function template, there were too few call argument...
Definition: Sema.h:8993
clang::Sema::CheckTollFreeBridgeCast
void CheckTollFreeBridgeCast(QualType castType, Expr *castExpr)
Definition: SemaExprObjC.cpp:4131
clang::Sema::ActOnTemplatedFriendTag
DeclResult ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists)
Handle a friend tag declaration where the scope specifier was templated.
Definition: SemaDeclCXX.cpp:16930
clang::Sema::BuildParmVarDeclForTypedef
ParmVarDecl * BuildParmVarDeclForTypedef(DeclContext *DC, SourceLocation Loc, QualType T)
Synthesizes a variable for a parameter arising from a typedef.
Definition: SemaDecl.cpp:14706
clang::Sema::updateOutOfDateSelector
void updateOutOfDateSelector(Selector Sel)
Definition: SemaDeclObjC.cpp:3427
clang::Sema::PSK_Pop_Set
@ PSK_Pop_Set
Definition: Sema.h:483
clang::Sema::ImplicitExceptionSpecification
Helper class that collects exception specifications for implicitly-declared special member functions.
Definition: Sema.h:6281
llvm::SmallVectorImpl
Definition: Randstruct.h:18
clang::Sema::CheckCompletedCoroutineBody
void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body)
Definition: SemaCoroutine.cpp:1093
clang::Sema::ActOnFinishObjCImplementation
DeclGroupPtrTy ActOnFinishObjCImplementation(Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
Definition: SemaDeclObjC.cpp:2116
clang::Sema::getOpenMPCaptureLevels
static int getOpenMPCaptureLevels(OpenMPDirectiveKind Kind)
Return the number of captured regions created for an OpenMP directive.
Definition: SemaOpenMP.cpp:4621
clang::Sema::getFunctionScopes
ArrayRef< sema::FunctionScopeInfo * > getFunctionScopes() const
Definition: Sema.h:811
clang::Sema::ActOnOpenMPUntiedClause
OMPClause * ActOnOpenMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'untied' clause.
Definition: SemaOpenMP.cpp:17410
clang::Sema::areVectorTypesSameSize
bool areVectorTypesSameSize(QualType srcType, QualType destType)
Definition: SemaExpr.cpp:7958
clang::Sema::CallingConventionIgnoredReason::ConstructorDestructor
@ ConstructorDestructor
clang::Sema::DefineImplicitLambdaToFunctionPointerConversion
void DefineImplicitLambdaToFunctionPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a function pointer.
Definition: SemaDeclCXX.cpp:15427
clang::Sema::CheckForImmediateInvocation
ExprResult CheckForImmediateInvocation(ExprResult E, FunctionDecl *Decl)
Wrap the expression in a ConstantExpr if it is a potential immediate invocation.
Definition: SemaExpr.cpp:17769
clang::Sema::GlobalMethodPool::Lists
std::pair< ObjCMethodList, ObjCMethodList > Lists
Definition: Sema.h:1512
clang::Sema::AddRangeBasedOptnone
void AddRangeBasedOptnone(FunctionDecl *FD)
Only called on function definitions; if there is a pragma in scope with the effect of a range-based o...
Definition: SemaAttr.cpp:1185
clang::Sema::CheckTemplateArgumentKind
CheckTemplateArgumentKind
Specifies the context in which a particular template argument is being checked.
Definition: Sema.h:8319
clang::EST_NoexceptFalse
@ EST_NoexceptFalse
noexcept(expression), evals to 'false'
Definition: ExceptionSpecificationType.h:28
clang::Sema::FindInstantiatedContext
DeclContext * FindInstantiatedContext(SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
Finds the instantiation of the given declaration context within the current instantiation.
Definition: SemaTemplateInstantiateDecl.cpp:5976
clang::Sema::HandleDeclarator
NamedDecl * HandleDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
Definition: SemaDecl.cpp:6225
clang::Sema::ExtParameterInfoBuilder::getPointerOrNull
const FunctionProtoType::ExtParameterInfo * getPointerOrNull(unsigned numParams)
Return a pointer (suitable for setting in an ExtProtoInfo) to the ExtParameterInfo array we've built ...
Definition: Sema.h:9926
clang::Sema::NTK_NonEnum
@ NTK_NonEnum
Definition: Sema.h:3290
clang::Sema::CVT_Host
@ CVT_Host
Emitted on device side with a shadow variable on host side.
Definition: Sema.h:13067
clang::Sema::CheckCompatibleReinterpretCast
void CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range)
Definition: SemaCast.cpp:2003
clang::Sema::ActOnCompoundStmt
StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr)
Definition: SemaStmt.cpp:409
true
#define true
Definition: stdbool.h:21
clang::Sema::ActOnOpenMPDeviceClause
OMPClause * ActOnOpenMPDeviceClause(OpenMPDeviceClauseModifier Modifier, Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'device' clause.
Definition: SemaOpenMP.cpp:20778
clang::CastKind
CastKind
CastKind - The kind of operation required for a conversion.
Definition: OperationKinds.h:20
clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective
StmtResult ActOnOpenMPParallelMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop simd' after parsing of the associated sta...
Definition: SemaOpenMP.cpp:13741
clang::Sema::referenceDLLExportedClassMethods
void referenceDLLExportedClassMethods()
Definition: SemaDeclCXX.cpp:13964
clang::Sema::ActOnOpenMPAtomicDefaultMemOrderClause
OMPClause * ActOnOpenMPAtomicDefaultMemOrderClause(OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'atomic_default_mem_order' clause.
Definition: SemaOpenMP.cpp:16830
clang::Sema::ModuleImportState::PrivateFragmentImportFinished
@ PrivateFragmentImportFinished
after 'module :private;' but a non-import decl has already been seen.
clang::Sema::LK_Numeric
@ LK_Numeric
Definition: Sema.h:3955
clang::Sema::TUK_Friend
@ TUK_Friend
Definition: Sema.h:3311
clang::Sema::BuildBuiltinCallExpr
Expr * BuildBuiltinCallExpr(SourceLocation Loc, Builtin::ID Id, MultiExprArg CallArgs)
BuildBuiltinCallExpr - Create a call to a builtin function specified by Id.
Definition: SemaExpr.cpp:7088
clang::Sema::ActOnOpenMPDeclareVariantDirective
void ActOnOpenMPDeclareVariantDirective(FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI, ArrayRef< Expr * > AdjustArgsNothing, ArrayRef< Expr * > AdjustArgsNeedDevicePtr, ArrayRef< OMPInteropInfo > AppendArgs, SourceLocation AdjustArgsLoc, SourceLocation AppendArgsLoc, SourceRange SR)
Called on well-formed '#pragma omp declare variant' after parsing of the associated method/function.
Definition: SemaOpenMP.cpp:7665
TemplateKinds.h
clang::VarTemplateDecl
Declaration of a variable template.
Definition: DeclTemplate.h:3119
clang::Sema::getPrintingPolicy
PrintingPolicy getPrintingPolicy() const
Retrieve a suitable printing policy for diagnostics.
Definition: Sema.h:3255
clang::Sema::ActOnFinishExportDecl
Decl * ActOnFinishExportDecl(Scope *S, Decl *ExportDecl, SourceLocation RBraceLoc)
Complete the definition of an export declaration.
Definition: SemaModule.cpp:930
clang::Sema::forceUnknownAnyToType
ExprResult forceUnknownAnyToType(Expr *E, QualType ToType)
Force an expression with unknown-type to an expression of the given type.
Definition: SemaExpr.cpp:20875
clang::Sema::AbstractSynthesizedIvarType
@ AbstractSynthesizedIvarType
Definition: Sema.h:7942
clang::Sema::ActOnCaseExpr
ExprResult ActOnCaseExpr(SourceLocation CaseLoc, ExprResult Val)
Definition: SemaStmt.cpp:458
llvm::SmallSetVector< StringRef, 4 >
clang::Sema::DecomposeUnqualifiedId
void DecomposeUnqualifiedId(const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template a...
Definition: SemaExpr.cpp:2146
clang::Sema::ActOnOpenMPTargetDataDirective
StmtResult ActOnOpenMPTargetDataDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target data' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13139
clang::Sema::ActOnCXXCatchBlock
StmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch ha...
Definition: SemaStmt.cpp:4322
clang::Sema::CodeCompleteConstructorInitializer
void CodeCompleteConstructorInitializer(Decl *Constructor, ArrayRef< CXXCtorInitializer * > Initializers)
Definition: SemaCodeComplete.cpp:6793
clang::Sema::ActOnPredefinedExpr
ExprResult ActOnPredefinedExpr(SourceLocation Loc, tok::TokenKind Kind)
Definition: SemaExpr.cpp:3605
clang::Sema::OMPIteratorData::ColonLoc
SourceLocation ColonLoc
Definition: Sema.h:5758
clang::Sema::ActOnProperty
Decl * ActOnProperty(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
Definition: SemaObjCProperty.cpp:172
clang::Sema::mergeOptimizeNoneAttr
OptimizeNoneAttr * mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI)
Definition: SemaDeclAttr.cpp:4879
clang::Sema::ExpressionEvaluationContextRecord::EK_Other
@ EK_Other
Definition: Sema.h:1331
clang::Sema::ParsingInitForAutoVars
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the...
Definition: Sema.h:872
Previous
StateNode * Previous
Definition: UnwrappedLineFormatter.cpp:1149
clang::Sema::MSVCGuidDecl
RecordDecl * MSVCGuidDecl
The MSVC "_GUID" struct, which is defined in MSVC header files.
Definition: Sema.h:1166
clang::Sema::PragmaAttributeCurrentTargetDecl
const Decl * PragmaAttributeCurrentTargetDecl
The declaration that is currently receiving an attribute from the #pragma attribute stack.
Definition: Sema.h:762
clang::ParsedAttributesView
Definition: ParsedAttr.h:920
clang::Expr
This represents one expression.
Definition: Expr.h:111
clang::BaseUsingDecl
Represents a C++ declaration that introduces decls from somewhere else.
Definition: DeclCXX.h:3331
clang::Sema::ActOnAccessSpecifier
bool ActOnAccessSpecifier(AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, const ParsedAttributesView &Attrs)
ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
Definition: SemaDeclCXX.cpp:3093
clang::Sema::FindAssociatedClassesAndNamespaces
void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
Find the associated classes and namespaces for argument-dependent lookup for a call with the given se...
Definition: SemaLookup.cpp:3244
clang::Sema::ActOnStartNamespaceDef
Decl * ActOnStartNamespaceDef(Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UsingDecl, bool IsNested)
ActOnStartNamespaceDef - This is called at the start of a namespace definition.
Definition: SemaDeclCXX.cpp:11208
clang::Sema::CFT_InvalidTarget
@ CFT_InvalidTarget
Definition: Sema.h:13053
clang::OpenMPScheduleClauseKind
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
Definition: OpenMPKinds.h:30
clang::Sema::getCurrentMangleNumberContext
std::tuple< MangleNumberingContext *, Decl * > getCurrentMangleNumberContext(const DeclContext *DC)
Compute the mangling number context for a lambda expression or block literal.
Definition: SemaLambda.cpp:276
clang::Preprocessor
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
Definition: Preprocessor.h:128
clang::Sema::NameClassification::NonTypeDecl
NamedDecl * NonTypeDecl
Definition: Sema.h:2670
clang::Sema::ConstraintEvalRAII::ConstraintEvalRAII
ConstraintEvalRAII(InstTy &TI)
Definition: Sema.h:9981
clang::Sema::ActOnOpenMPDeclareReductionInitializerStart
VarDecl * ActOnOpenMPDeclareReductionInitializerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
Definition: SemaOpenMP.cpp:22245
clang::Sema::CheckFunctionOrTemplateParamDeclarator
void CheckFunctionOrTemplateParamDeclarator(Scope *S, Declarator &D)
Common checks for a parameter-declaration that should apply to both function parameters and non-type ...
Definition: SemaDecl.cpp:14560
clang::ASTDeclReader
Definition: ASTReaderDecl.cpp:81
clang::Sema::GlobalMethodPool::iterator
llvm::DenseMap< Selector, Lists >::iterator iterator
Definition: Sema.h:1513
clang::Sema::BuildUnresolvedCoawaitExpr
ExprResult BuildUnresolvedCoawaitExpr(SourceLocation KwLoc, Expr *Operand, UnresolvedLookupExpr *Lookup)
Definition: SemaCoroutine.cpp:833
clang::Sema::CodeSynthesisContext::Entity
Decl * Entity
The entity that is being synthesized.
Definition: Sema.h:9301
clang::Sema::SimplerImplicitMoveMode::ForceOn
@ ForceOn
SM
#define SM(sm)
Definition: Cuda.cpp:78
clang::Sema::VerifyICEDiagnoser::VerifyICEDiagnoser
VerifyICEDiagnoser(bool Suppress=false)
Definition: Sema.h:12896
clang::ConstructorUsingShadowDecl
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition: DeclCXX.h:3512
clang::Sema::SkipBodyInfo::Previous
NamedDecl * Previous
Definition: Sema.h:2588
clang::ExternalSemaSource::ReadTentativeDefinitions
virtual void ReadTentativeDefinitions(SmallVectorImpl< VarDecl * > &TentativeDefs)
Read the set of tentative definitions known to the external Sema source.
Definition: ExternalSemaSource.h:105
clang::Sema::checkSYCLDeviceFunction
bool checkSYCLDeviceFunction(SourceLocation Loc, FunctionDecl *Callee)
Check whether we're allowed to call Callee from the current context.
Definition: SemaSYCL.cpp:36
clang::Sema::AlignPackInfo::IsPackAttr
bool IsPackAttr() const
Definition: Sema.h:544
clang::Sema::DiagnoseUnusedBackingIvarInAccessor
void DiagnoseUnusedBackingIvarInAccessor(Scope *S, const ObjCImplementationDecl *ImplD)
DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is n...
Definition: SemaDeclObjC.cpp:5339
clang::Sema::ConditionResult::getKnownValue
std::optional< bool > getKnownValue() const
Definition: Sema.h:12817
clang::Sema::HandleMSProperty
MSPropertyDecl * HandleMSProperty(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, const ParsedAttr &MSPropertyAttr)
HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.
Definition: SemaDeclCXX.cpp:18485
clang::Sema::SubstParmVarDecl
ParmVarDecl * SubstParmVarDecl(ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, std::optional< unsigned > NumExpansions, bool ExpectParameterPack, bool EvaluateConstraints=true)
Definition: SemaTemplateInstantiate.cpp:2693
clang::Sema::NameClassification::Error
static NameClassification Error()
Definition: Sema.h:2682
clang::concepts::ExprRequirement
A requires-expression requirement which queries the validity and properties of an expression ('simple...
Definition: ExprConcepts.h:255
clang::Sema::AddOverloadedCallCandidates
void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add the overload candidates named by callee and/or found by argument dependent lookup to the given ov...
Definition: SemaOverload.cpp:12958
clang::Sema::BuildCXXThrow
ExprResult BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
Definition: SemaExprCXX.cpp:862
clang::Sema::NestedNameSpecInfo
Keeps information about an identifier in a nested-name-spec.
Definition: Sema.h:6924
clang::Sema::SetDelegatingInitializer
bool SetDelegatingInitializer(CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
Definition: SemaDeclCXX.cpp:5153
clang::Sema::PCSK_Rodata
@ PCSK_Rodata
Definition: Sema.h:454
clang::Sema::AddAlignmentAttributesForRecord
void AddAlignmentAttributesForRecord(RecordDecl *RD)
AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl,...
Definition: SemaAttr.cpp:53
clang::Sema::isCurrentClassName
bool isCurrentClassName(const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
isCurrentClassName - Determine whether the identifier II is the name of the class type currently bein...
Definition: SemaDeclCXX.cpp:2464
clang::Sema::LookupOMPReductionName
@ LookupOMPReductionName
Look up the name of an OpenMP user-defined reduction operation.
Definition: Sema.h:4329
clang::CXXCtorInitializer
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2219
clang::Sema::AP_PragmaClangAttribute
@ AP_PragmaClangAttribute
The availability attribute was applied using '#pragma clang attribute'.
Definition: Sema.h:3627
clang::Sema::isStdInitializerList
bool isStdInitializerList(QualType Ty, QualType *Element)
Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL,...
Definition: SemaDeclCXX.cpp:11557
clang::CleanupInfo
Definition: CleanupInfo.h:19
clang::Sema::handleLambdaNumbering
void handleLambdaNumbering(CXXRecordDecl *Class, CXXMethodDecl *Method, std::optional< std::tuple< bool, unsigned, unsigned, Decl * >> Mangling=std::nullopt)
Number lambda for linkage purposes if necessary.
Definition: SemaLambda.cpp:436
clang::Sema::BuildResolvedCallExpr
ExprResult BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false, ADLCallKind UsesADL=ADLCallKind::NotADL)
BuildResolvedCallExpr - Build a call to a resolved expression, i.e.
Definition: SemaExpr.cpp:7154
clang::Sema::DefineUsedVTables
bool DefineUsedVTables()
Define all of the vtables that have been used in this translation unit and reference any virtual memb...
Definition: SemaDeclCXX.cpp:17990
clang::Sema::DefaultedFunctionKind::asSpecialMember
CXXSpecialMember asSpecialMember() const
Definition: Sema.h:3415
clang::Sema::UPPC_RequiresClause
@ UPPC_RequiresClause
Definition: Sema.h:8657
clang::Sema::FormatArgumentPassingKind
FormatArgumentPassingKind
Definition: Sema.h:13402
clang::Sema::getCurrentThisType
QualType getCurrentThisType()
Try to retrieve the type of the 'this' pointer.
Definition: SemaExprCXX.cpp:1191
clang::Sema::SubstExceptionSpec
void SubstExceptionSpec(FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
Definition: SemaTemplateInstantiate.cpp:2558
Availability.h
clang::transformer::name
RangeSelector name(std::string ID)
Given a node with a "name", (like NamedDecl, DeclRefExpr, CxxCtorInitializer, and TypeLoc) selects th...
Definition: RangeSelector.cpp:200
clang::Sema::canSkipFunctionBody
bool canSkipFunctionBody(Decl *D)
Determine whether we can skip parsing the body of a function definition, assuming we don't care about...
Definition: SemaDecl.cpp:15343
clang::Sema::PragmaClangRodataSection
PragmaClangSection PragmaClangRodataSection
Definition: Sema.h:472
clang::Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder
SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID, FunctionDecl *Fn, Sema &S)
Definition: Sema.cpp:1813
clang::Sema::checkAllowedCUDAInitializer
void checkAllowedCUDAInitializer(VarDecl *VD)
Definition: SemaCUDA.cpp:607
clang::Sema::ActOnNameClassifiedAsNonType
ExprResult ActOnNameClassifiedAsNonType(Scope *S, const CXXScopeSpec &SS, NamedDecl *Found, SourceLocation NameLoc, const Token &NextToken)
Act on the result of classifying a name as a specific non-type declaration.
Definition: SemaDecl.cpp:1283
clang::Sema::OffsetOfComponent::E
Expr * E
Definition: Sema.h:5959
clang::Sema::incrementMSManglingNumber
void incrementMSManglingNumber() const
Definition: Sema.h:13748
clang::Sema::PP
Preprocessor & PP
Definition: Sema.h:408
clang::EnumType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
Definition: Type.h:4849
clang::Sema::CodeCompleteObjCMethodDeclSelector
void CodeCompleteObjCMethodDeclSelector(Scope *S, bool IsInstanceMethod, bool AtParameterName, ParsedType ReturnType, ArrayRef< IdentifierInfo * > SelIdents)
Definition: SemaCodeComplete.cpp:9627
clang::Sema::BuildReferenceType
QualType BuildReferenceType(QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
Build a reference type.
Definition: SemaType.cpp:2218
clang::Sema::ImplicitExceptionSpecification::size
unsigned size() const
The number of exceptions in the exception specification.
Definition: Sema.h:6314
clang::Sema::ProcessDeclAttributeOptions
Definition: Sema.h:4640
clang::Sema::BuildObjCEncodeExpression
ExprResult BuildObjCEncodeExpression(SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
Definition: SemaExprObjC.cpp:1128
clang::Sema::LOLR_Cooked
@ LOLR_Cooked
The lookup found a single 'cooked' literal operator, which expects a normal literal to be built and p...
Definition: Sema.h:4370
clang::Sema::AlignPackIncludeState::ShouldWarnOnInclude
bool ShouldWarnOnInclude
Definition: Sema.h:691
clang::Sema::NC_VarTemplate
@ NC_VarTemplate
The name was classified as a variable template name.
Definition: Sema.h:2657
clang::Sema::LookupUsingDeclName
@ LookupUsingDeclName
Look up all declarations in a scope with the given name, including resolved using declarations.
Definition: Sema.h:4315
clang::PreferredTypeBuilder::enterMemAccess
void enterMemAccess(Sema &S, SourceLocation Tok, Expr *Base)
Definition: SemaCodeComplete.cpp:566
clang::Sema::CheckUsingShadowDecl
bool CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
Determines whether to create a using shadow decl for a particular decl, given the set of decls existi...
Definition: SemaDeclCXX.cpp:11991
clang::Sema::ActOnOMPArraySectionExpr
ExprResult ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc)
Definition: SemaExpr.cpp:5093
clang::Sema::NTK_Template
@ NTK_Template
Definition: Sema.h:3293
clang::Sema::EmitCurrentDiagnostic
void EmitCurrentDiagnostic(unsigned DiagID)
Cause the active diagnostic on the DiagosticsEngine to be emitted.
Definition: Sema.cpp:1482
clang::Sema::UPPC_NonTypeTemplateParameterType
@ UPPC_NonTypeTemplateParameterType
The type of a non-type template parameter.
Definition: Sema.h:8630
clang::Sema::DeduceTemplateSpecializationFromInitializer
QualType DeduceTemplateSpecializationFromInitializer(TypeSourceInfo *TInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Init)
Definition: SemaInit.cpp:10316
clang::Sema::NamedReturnInfo::MoveEligible
@ MoveEligible
Definition: Sema.h:5170
clang::IdentifierLoc
Wraps an identifier and optional source location for the identifier.
Definition: ParsedAttr.h:211
clang::Sema::ActOnLambdaExpr
ExprResult ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body, Scope *CurScope)
ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.
Definition: SemaLambda.cpp:1674
clang::Sema::diagnoseArgIndependentDiagnoseIfAttrs
bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND, SourceLocation Loc)
Emit diagnostics for the diagnose_if attributes on Function, ignoring any ArgDependent DiagnoseIfAttr...
Definition: SemaOverload.cpp:6914
clang::Sema::MarkFunctionReferenced
void MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, bool MightBeOdrUse=true)
Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2,...
Definition: SemaExpr.cpp:18220
clang::Sema::OpenMPVarListDataTy::ExtraModifierLoc
SourceLocation ExtraModifierLoc
Definition: Sema.h:11992
clang::Sema::ActOnOpenMPTaskLoopSimdDirective
StmtResult ActOnOpenMPTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13401
clang::Sema::TryCaptureKind
TryCaptureKind
Definition: Sema.h:5437
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:767
clang::ClassTemplateSpecializationDecl
Represents a class template specialization, which refers to a class template with a given set of temp...
Definition: DeclTemplate.h:1826
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3483
clang::Sema::CheckDelegatingCtorCycles
void CheckDelegatingCtorCycles()
Definition: SemaDeclCXX.cpp:18242
clang::Sema::TypeTagMagicValue
std::pair< const IdentifierInfo *, uint64_t > TypeTagMagicValue
A pair of ArgumentKind identifier and magic value.
Definition: Sema.h:13681
clang::Sema::CheckMemberOperatorAccess
AccessResult CheckMemberOperatorAccess(SourceLocation Loc, Expr *ObjectExpr, const SourceRange &, DeclAccessPair FoundDecl)
Definition: SemaAccess.cpp:1766
clang::Sema::checkUnsafeAssigns
bool checkUnsafeAssigns(SourceLocation Loc, QualType LHS, Expr *RHS)
checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.
Definition: SemaChecking.cpp:16945
MangleNumberingContext.h
clang::Sema::SubstExprs
bool SubstExprs(ArrayRef< Expr * > Exprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr * > &Outputs)
Substitute the given template arguments into a list of expressions, expanding pack expansions if requ...
Definition: SemaTemplateInstantiate.cpp:3951
clang::Sema::NSAPIObj
std::unique_ptr< NSAPI > NSAPIObj
Caches identifiers/selectors for NSFoundation APIs.
Definition: Sema.h:1173
clang::Sema::CheckExceptionSpecCompatibility
bool CheckExceptionSpecCompatibility(Expr *From, QualType ToType)
Definition: SemaExceptionSpec.cpp:921
clang::Sema::NeedToCaptureVariable
bool NeedToCaptureVariable(ValueDecl *Var, SourceLocation Loc)
Checks if the variable must be captured.
Definition: SemaExpr.cpp:19292
clang::EnterExpressionEvaluationContext::InitList
@ InitList
Definition: Sema.h:13942
clang::Sema::ActOnOpenMPTargetParallelForDirective
StmtResult ActOnOpenMPTargetParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13052
clang::Sema::FinishTemplateArgumentDeduction
TemplateDeductionResult FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr, bool PartialOverloading=false, llvm::function_ref< bool()> CheckNonDependent=[]{ return false;})
Finish template argument deduction for a function template, checking the deduced template arguments f...
Definition: SemaTemplateDeduction.cpp:3538
clang::Sema::ActOnStartOfFunctionDef
Decl * ActOnStartOfFunctionDef(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr, FnBodyKind BodyKind=FnBodyKind::Other)
Definition: SemaDecl.cpp:14897
clang::Sema::BuildOperatorCoawaitLookupExpr
ExprResult BuildOperatorCoawaitLookupExpr(Scope *S, SourceLocation Loc)
Definition: SemaCoroutine.cpp:811
clang::Sema::ExtnameUndeclaredIdentifiers
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > ExtnameUndeclaredIdentifiers
ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared.
Definition: Sema.h:1115
clang::Sema::ModuleDeclKind
ModuleDeclKind
Definition: Sema.h:3142
clang::Sema::ActOnCompoundLiteral
ExprResult ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc, Expr *InitExpr)
Definition: SemaExpr.cpp:7447
clang::Sema::FindDeallocationFunction
bool FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true, bool WantSize=false, bool WantAligned=false)
Definition: SemaExprCXX.cpp:3245
clang::Sema::getOwningModule
Module * getOwningModule(const Decl *Entity)
Get the module owning an entity.
Definition: Sema.h:2339
clang::Sema::ActOnPopScope
void ActOnPopScope(SourceLocation Loc, Scope *S)
Scope actions.
Definition: SemaDecl.cpp:2212
clang::Sema::ActOnOpenMPUnifiedSharedMemoryClause
OMPClause * ActOnOpenMPUnifiedSharedMemoryClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
Definition: SemaOpenMP.cpp:17491
clang::Sema::BuildBlockForLambdaConversion
ExprResult BuildBlockForLambdaConversion(SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
Definition: SemaLambda.cpp:2009
clang::Sema::AllowedExplicit::Conversions
@ Conversions
Allow explicit conversion functions but not explicit constructors.
clang::Sema::NC_Error
@ NC_Error
Classification failed; an error has been produced.
Definition: Sema.h:2632
clang::Sema::CheckedConversionKind
CheckedConversionKind
The kind of conversion being performed.
Definition: Sema.h:12201
clang::Sema::CodeSynthesisContext::Kind
enum clang::Sema::CodeSynthesisContext::SynthesisKind Kind
clang::Sema::BuildTypeTrait
ExprResult BuildTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc)
Definition: SemaExprCXX.cpp:5558
clang::Sema::PCC_Type
@ PCC_Type
Code completion occurs where only a type is permitted.
Definition: Sema.h:13239
clang::Sema::CheckPointerConversion
bool CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose=true)
CheckPointerConversion - Check the pointer conversion from the expression From to the type ToType.
Definition: SemaOverload.cpp:3100
clang::Sema::ActOnNameClassifiedAsOverloadSet
ExprResult ActOnNameClassifiedAsOverloadSet(Scope *S, Expr *OverloadSet)
Act on the result of classifying a name as an overload set.
Definition: SemaDecl.cpp:1300
clang::Sema::DiagnoseUnusedExprResult
void DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID)
DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused,...
Definition: SemaStmt.cpp:219
clang::Sema::ParseObjCStringLiteral
ExprResult ParseObjCStringLiteral(SourceLocation *AtLocs, ArrayRef< Expr * > Strings)
Definition: SemaExprObjC.cpp:36
clang::Sema::CodeCompleteObjCPropertySetter
void CodeCompleteObjCPropertySetter(Scope *S)
Definition: SemaCodeComplete.cpp:7599
clang::ASTContext::BoolTy
CanQualType BoolTy
Definition: ASTContext.h:1079
clang::Sema::DiagnoseConditionalForNull
bool DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc)
Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a p...
Definition: SemaExpr.cpp:8351
clang::Sema::ActOnFinishSwitchStmt
StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
Definition: SemaStmt.cpp:1214
clang::RISCV::Invalid
@ Invalid
Definition: RISCVVIntrinsicUtils.h:213
clang::Sema::isTemplateName
TemplateNameKind isTemplateName(Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization, bool Disambiguation=false)
Definition: SemaTemplate.cpp:173
clang::DeclRefExpr
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1235
clang::Sema::checkTargetAttr
bool checkTargetAttr(SourceLocation LiteralLoc, StringRef Str)
Definition: SemaDeclAttr.cpp:3397
clang::Sema::AbstractDiagSelID
AbstractDiagSelID
Definition: Sema.h:7935
clang::Sema::ActOnPureSpecifier
void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc)
Definition: SemaDeclCXX.cpp:17822
clang::NamespaceDecl
Represent a C++ namespace.
Definition: Decl.h:542
clang::Sema::NSNumberPointer
QualType NSNumberPointer
Pointer to NSNumber type (NSNumber *).
Definition: Sema.h:1182
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1917
clang::Sema::Ref_Compatible
@ Ref_Compatible
Ref_Compatible - The two types are reference-compatible.
Definition: Sema.h:12662
clang::Sema::ComparisonCategoryUsage::DefaultedOperator
@ DefaultedOperator
A defaulted 'operator<=>' needed the comparison category.
clang::Sema::BuildCompoundLiteralExpr
ExprResult BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr)
Definition: SemaExpr.cpp:7461
clang::Sema::prepareVectorSplat
ExprResult prepareVectorSplat(QualType VectorTy, Expr *SplattedExpr)
Prepare SplattedExpr for a vector splat operation, adding implicit casts if necessary.
Definition: SemaExpr.cpp:8099
clang::Sema::ExtParameterInfoBuilder::set
void set(unsigned index, FunctionProtoType::ExtParameterInfo info)
Set the ExtParameterInfo for the parameter at the given index,.
Definition: Sema.h:9914
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3996
clang::Sema::ActOnOpenMPUseClause
OMPClause * ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'use' clause.
Definition: SemaOpenMP.cpp:17662
clang::TemplateParameter
llvm::PointerUnion< TemplateTypeParmDecl *, NonTypeTemplateParmDecl *, TemplateTemplateParmDecl * > TemplateParameter
Stores a template parameter of any kind.
Definition: DeclTemplate.h:65
clang::Sema::ActOnFinishCXXMemberSpecification
void ActOnFinishCXXMemberSpecification(Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
Definition: SemaDeclCXX.cpp:10204
clang::Sema::ActOnCXXTypeConstructExpr
ExprResult ActOnCXXTypeConstructExpr(ParsedType TypeRep, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization)
ActOnCXXTypeConstructExpr - Parse construction of a specified type.
Definition: SemaExprCXX.cpp:1427
clang::Sema::UndefinedButUsed
llvm::MapVector< NamedDecl *, SourceLocation > UndefinedButUsed
UndefinedInternals - all the used, undefined objects which require a definition in this translation u...
Definition: Sema.h:1494
clang::Sema::FullExprArg::operator->
Expr * operator->()
Definition: Sema.h:4990
clang::Sema::ImplicitExceptionSpecification::data
const QualType * data() const
The set of exceptions in the exception specification.
Definition: Sema.h:6317
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2813
clang::Sema::HandleExprEvaluationContextForTypeof
ExprResult HandleExprEvaluationContextForTypeof(Expr *E)
Definition: SemaExpr.cpp:18045
clang::ObjCList< ObjCProtocolDecl >
clang::Sema::ActOnCXXUuidof
ExprResult ActOnCXXUuidof(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXUuidof - Parse __uuidof( something ).
Definition: SemaExprCXX.cpp:786
clang::Sema::CheckConstraintExpression
bool CheckConstraintExpression(const Expr *CE, Token NextToken=Token(), bool *PossibleNonPrimary=nullptr, bool IsTrailingRequiresClause=false)
Check whether the given expression is a valid constraint expression.
Definition: SemaConcept.cpp:88
clang::Sema::OpaqueParser
void * OpaqueParser
Definition: Sema.h:927
clang::Sema::CheckRedeclarationModuleOwnership
bool CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old)
We've determined that New is a redeclaration of Old.
Definition: SemaDecl.cpp:1638
clang::Sema::OpenMPVarListDataTy::MotionModifiersLoc
SmallVector< SourceLocation, NumberOfOMPMotionModifiers > MotionModifiersLoc
Definition: Sema.h:11990
clang::Sema::DelayedDiagnostics::add
void add(const sema::DelayedDiagnostic &diag)
Adds a delayed diagnostic.
Definition: DelayedDiagnostic.h:325
clang::Sema::CodeSynthesisContext::PriorTemplateArgumentSubstitution
@ PriorTemplateArgumentSubstitution
We are substituting prior template arguments into a new template parameter.
Definition: Sema.h:9223
StmtCXX.h
clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs
bool isTemplateTemplateParameterAtLeastAsSpecializedAs(TemplateParameterList *PParam, TemplateDecl *AArg, SourceLocation Loc)
Definition: SemaTemplateDeduction.cpp:5736
clang::Sema::checkPseudoObjectIncDec
ExprResult checkPseudoObjectIncDec(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op)
Check an increment or decrement of a pseudo-object expression.
Definition: SemaPseudoObject.cpp:1552
clang::Sema::ActOnOpenMPThreadLimitClause
OMPClause * ActOnOpenMPThreadLimitClause(Expr *ThreadLimit, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'thread_limit' clause.
Definition: SemaOpenMP.cpp:22513
clang::Sema::CheckObjCMethodOverride
void CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
Check whether the given new method is a valid override of the given overridden method,...
Definition: SemaDeclObjC.cpp:136
clang::Sema::CodeSynthesisContext::DefiningSynthesizedFunction
@ DefiningSynthesizedFunction
We are defining a synthesized function (such as a defaulted special member).
Definition: Sema.h:9253
clang::Sema::VtorDispStack
PragmaStack< MSVtorDispMode > VtorDispStack
Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.
Definition: Sema.h:685
SemaConcept.h
clang::Sema::ActOnTemplateDeclarator
Decl * ActOnTemplateDeclarator(Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
Definition: SemaTemplate.cpp:8912
clang::Sema::hasVisibleMergedDefinition
bool hasVisibleMergedDefinition(NamedDecl *Def)
Definition: SemaLookup.cpp:1605
clang::Sema::CheckBooleanCondition
ExprResult CheckBooleanCondition(SourceLocation Loc, Expr *E, bool IsConstexpr=false)
CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean cond...
Definition: SemaExpr.cpp:20359
clang::TypeConstraint
Definition: ASTConcept.h:180
clang::Sema::checkTargetClonesAttrString
bool checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl< SmallString< 64 >> &StringsBuffer)
Definition: SemaDeclAttr.cpp:3500
clang::Sema::AtomicArgumentOrder::AST
@ AST
clang::Sema::ActOnObjCAtThrowStmt
StmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw, Scope *CurScope)
Definition: SemaStmt.cpp:4256
clang::Sema::OSMK_None
@ OSMK_None
Definition: Sema.h:10378
clang::Sema::CodeCompleteObjCClassPropertyRefExpr
void CodeCompleteObjCClassPropertyRefExpr(Scope *S, IdentifierInfo &ClassName, SourceLocation ClassNameLoc, bool IsBaseExprStatement)
Definition: SemaCodeComplete.cpp:5771
clang::Sema::PragmaAlignPackDiagnoseKind::ChangedStateAtExit
@ ChangedStateAtExit
clang::Sema::RebuildTypeInCurrentInstantiation
TypeSourceInfo * RebuildTypeInCurrentInstantiation(TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
Rebuilds a type within the context of the current instantiation.
Definition: SemaTemplate.cpp:11186
clang::Sema::CodeSynthesisContext::CodeSynthesisContext
CodeSynthesisContext()
Definition: Sema.h:9344
clang::Sema::PoppedFunctionScopeDeleter::operator()
void operator()(sema::FunctionScopeInfo *Scope) const
Definition: Sema.cpp:2257
clang::Sema::IdentifyCUDATarget
CUDAFunctionTarget IdentifyCUDATarget(const FunctionDecl *D, bool IgnoreImplicitHDAttr=false)
Determines whether the given function is a CUDA device/host/kernel/etc.
Definition: SemaCUDA.cpp:116
clang::Sema::CheckMemberPointerConversion
bool CheckMemberPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the ty...
Definition: SemaOverload.cpp:3228
clang::Sema::isDeductionGuideName
bool isDeductionGuideName(Scope *S, const IdentifierInfo &Name, SourceLocation NameLoc, ParsedTemplateTy *Template=nullptr)
Determine whether a particular identifier might be the name in a C++1z deduction-guide declaration.
Definition: SemaTemplate.cpp:317
clang::Sema::LK_Block
@ LK_Block
Definition: Sema.h:3958
clang::Sema::MMS_strict
@ MMS_strict
Definition: Sema.h:4850
clang::Sema::currentModuleIsHeaderUnit
bool currentModuleIsHeaderUnit() const
Is the module scope we are in a C++ Header Unit?
Definition: Sema.h:2333
clang::Sema::ActOnOpenMPSectionsDirective
StmtResult ActOnOpenMPSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp sections' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10405
clang::Sema::ActOnCallExpr
ExprResult ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr)
ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
Definition: SemaExpr.cpp:6846
clang::Sema::SubstFunctionDeclType
TypeSourceInfo * SubstFunctionDeclType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, Qualifiers ThisTypeQuals, bool EvaluateConstraints=true)
A form of SubstType intended specifically for instantiating the type of a FunctionDecl.
Definition: SemaTemplateInstantiate.cpp:2502
clang::Sema::SpecialMemberCache
llvm::FoldingSet< SpecialMemberOverloadResultEntry > SpecialMemberCache
A cache of special member function overload resolution results for C++ records.
Definition: Sema.h:1456
clang::Sema::DiagnoseAssignmentAsCondition
void DiagnoseAssignmentAsCondition(Expr *E)
DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition,...
Definition: SemaExpr.cpp:20274
clang::Sema::TDK_Underqualified
@ TDK_Underqualified
Template argument deduction failed due to inconsistent cv-qualifiers on a template parameter type tha...
Definition: Sema.h:8974
clang::operator==
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
Definition: CallGraph.h:207
clang::Sema::CodeSynthesisContext::DeductionInfo
sema::TemplateDeductionInfo * DeductionInfo
The template deduction info object associated with the substitution or checking of explicit or deduce...
Definition: Sema.h:9337
clang::Sema::BuildCXXFoldExpr
ExprResult BuildCXXFoldExpr(UnresolvedLookupExpr *Callee, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc, std::optional< unsigned > NumExpansions)
Definition: SemaTemplateVariadic.cpp:1258
clang::FileNullability::SawTypeNullability
bool SawTypeNullability
Whether we saw any type nullability annotations in the given file.
Definition: Sema.h:262
clang::Sema::BuildVectorLiteral
ExprResult BuildVectorLiteral(SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
Build an altivec or OpenCL literal.
Definition: SemaExpr.cpp:8240
clang::Sema::LK_None
@ LK_None
Definition: Sema.h:3959
clang::Sema::RequireCompleteExprType
bool RequireCompleteExprType(Expr *E, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2525
clang::Sema::POAK_Native
@ POAK_Native
Definition: Sema.h:10575
clang::Sema::setFunctionHasBranchProtectedScope
void setFunctionHasBranchProtectedScope()
Definition: Sema.cpp:2288
clang::Sema::getCompletedType
QualType getCompletedType(Expr *E)
Get the type of expression E, triggering instantiation to complete the type if necessary – that is,...
Definition: SemaType.cpp:8663
clang::Sema::ActOnStmtExprError
void ActOnStmtExprError()
Definition: SemaExpr.cpp:16126
clang::Sema::OCK_Protocol
@ OCK_Protocol
Definition: Sema.h:10175
clang::Sema::CheckCallingConvAttr
bool CheckCallingConvAttr(const ParsedAttr &attr, CallingConv &CC, const FunctionDecl *FD=nullptr)
Definition: SemaDeclAttr.cpp:5207
llvm::IntrusiveRefCntPtr
Definition: LLVM.h:43
clang::Sema::getReturnTypeLoc
TypeLoc getReturnTypeLoc(FunctionDecl *FD) const
Definition: SemaStmt.cpp:3770
clang::Sema::DefineDefaultedComparison
void DefineDefaultedComparison(SourceLocation Loc, FunctionDecl *FD, DefaultedComparisonKind DCK)
Definition: SemaDeclCXX.cpp:8858
clang::Sema::BuildStdInitializerList
QualType BuildStdInitializerList(QualType Element, SourceLocation Loc)
Looks for the std::initializer_list template and instantiates it with Element, or emits an error if i...
Definition: SemaDeclCXX.cpp:11651
clang::Sema::VAK_Undefined
@ VAK_Undefined
Definition: Sema.h:12288
clang::Sema::ActOnBlockStmtExpr
ExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully compl...
Definition: SemaExpr.cpp:16589
clang::Sema::RequireStructuralType
bool RequireStructuralType(QualType T, SourceLocation Loc)
Require the given type to be a structural type, and diagnose if it is not.
Definition: SemaTemplate.cpp:1308
clang::CodeCompletionTUInfo
Definition: CodeCompleteConsumer.h:650
clang::Sema::CodeSynthesisContext::MarkingClassDllexported
@ MarkingClassDllexported
We are marking a class as __dllexport.
Definition: Sema.h:9281
clang::Sema::CheckLiteralOperatorDeclaration
bool CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl)
CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is ...
Definition: SemaDeclCXX.cpp:16169
clang::Sema::CodeCompleteObjCMessageReceiver
void CodeCompleteObjCMessageReceiver(Scope *S)
Definition: SemaCodeComplete.cpp:7892
clang::Sema::PrepareCastToObjCObjectPointer
CastKind PrepareCastToObjCObjectPointer(ExprResult &E)
Prepare a conversion of the given expression to an ObjC object pointer type.
Definition: SemaExpr.cpp:7682
clang::Sema::ActOnOpenMPReleaseClause
OMPClause * ActOnOpenMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'release' clause.
Definition: SemaOpenMP.cpp:17461
clang::Sema::LateInstantiatedAttribute::LateInstantiatedAttribute
LateInstantiatedAttribute(const Attr *A, LocalInstantiationScope *S, Decl *D)
Definition: Sema.h:10062
clang::Sema::CodeCompleteObjCPropertyFlags
void CodeCompleteObjCPropertyFlags(Scope *S, ObjCDeclSpec &ODS)
Definition: SemaCodeComplete.cpp:7343
clang::Sema::SubstBaseSpecifiers
bool SubstBaseSpecifiers(CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Perform substitution on the base class specifiers of the given class template specialization.
Definition: SemaTemplateInstantiate.cpp:2921
clang::Sema::ActOnFinishRequiresExpr
void ActOnFinishRequiresExpr()
Definition: SemaExprCXX.cpp:9130
clang::Sema::TypeTy
OpaquePtr< QualType > TypeTy
Definition: Sema.h:402
clang::Sema::ActOnParamDeclarator
Decl * ActOnParamDeclarator(Scope *S, Declarator &D)
ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into fun...
Definition: SemaDecl.cpp:14599
clang::DeclSpec
Captures information about "declaration specifiers".
Definition: DeclSpec.h:230
clang::Sema::FillInlineAsmIdentifierInfo
void FillInlineAsmIdentifierInfo(Expr *Res, llvm::InlineAsmIdentifierInfo &Info)
Definition: SemaStmtAsm.cpp:748
clang::Sema::ActOnOpenMPSizesClause
OMPClause * ActOnOpenMPSizesClause(ArrayRef< Expr * > SizeExprs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'sizes' clause.
Definition: SemaOpenMP.cpp:16950
clang::Sema::NumSFINAEErrors
unsigned NumSFINAEErrors
The number of SFINAE diagnostics that have been trapped.
Definition: Sema.h:1474
clang::Sema::getTemplateArgumentBindingsText
std::string getTemplateArgumentBindingsText(const TemplateParameterList *Params, const TemplateArgumentList &Args)
Produces a formatted string that describes the binding of template parameters to template arguments.
Definition: SemaTemplate.cpp:11269
clang::Sema::ActOnModuleBegin
void ActOnModuleBegin(SourceLocation DirectiveLoc, Module *Mod)
The parsed has entered a submodule.
Definition: SemaModule.cpp:654
clang::Sema::PragmaStack::SentinelAction
void SentinelAction(PragmaMsStackAction Action, StringRef Label)
Definition: Sema.h:657
clang::Sema::CodeCompleteAfterIf
void CodeCompleteAfterIf(Scope *S, bool IsBracedThen)
Definition: SemaCodeComplete.cpp:6488
clang::Sema::ReferenceConversionsScope
Definition: Sema.h:12666
clang::Sema::AddAllocAlignAttr
void AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr)
AddAllocAlignAttr - Adds an alloc_align attribute to a particular declaration.
Definition: SemaDeclAttr.cpp:1727
clang::Sema::ActOnOpenMPParallelMasterDirective
StmtResult ActOnOpenMPParallelMasterDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel master' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10970
clang::Sema::PoppedFunctionScopePtr
std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter > PoppedFunctionScopePtr
Definition: Sema.h:1980
clang::Sema::CheckCUDACall
bool CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee)
Check whether we're allowed to call Callee from the current context.
Definition: SemaCUDA.cpp:784
clang::Sema::FunctionEmissionStatus::OMPDiscarded
@ OMPDiscarded
clang::Sema::UPPC_DataMemberType
@ UPPC_DataMemberType
The type of a data member.
Definition: Sema.h:8600
clang::Sema::PushParsingDeclaration
ParsingDeclState PushParsingDeclaration(sema::DelayedDiagnosticPool &pool)
Definition: Sema.h:5331
clang::Sema::WeakTopLevelDecl
SmallVector< Decl *, 2 > WeakTopLevelDecl
WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing o...
Definition: Sema.h:1126
clang::Sema::UPPC_UsingDeclaration
@ UPPC_UsingDeclaration
A using declaration.
Definition: Sema.h:8615
clang::Sema::BuildCXXThisExpr
Expr * BuildCXXThisExpr(SourceLocation Loc, QualType Type, bool IsImplicit)
Build a CXXThisExpr and mark it referenced in the current context.
Definition: SemaExprCXX.cpp:1392
clang::Sema::AdjustDestructorExceptionSpec
void AdjustDestructorExceptionSpec(CXXDestructorDecl *Destructor)
Build an exception spec for destructors that don't have one.
Definition: SemaDeclCXX.cpp:13975
clang::Sema::ActOnBaseSpecifier
BaseResult ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange, const ParsedAttributesView &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
ActOnBaseSpecifier - Parsed a base specifier.
Definition: SemaDeclCXX.cpp:2689
clang::Sema::CheckARCMethodDecl
bool CheckARCMethodDecl(ObjCMethodDecl *method)
Check a method declaration for compatibility with the Objective-C ARC conventions.
Definition: SemaDeclObjC.cpp:225
clang::Sema::TypeDiagnoser::~TypeDiagnoser
virtual ~TypeDiagnoser()
Definition: Sema.h:2176
clang::Sema::MSFunctionNoBuiltins
llvm::SmallSetVector< StringRef, 4 > MSFunctionNoBuiltins
Set of no-builtin functions listed by #pragma function.
Definition: Sema.h:777
clang::Sema::CheckBaseClassAccess
AccessResult CheckBaseClassAccess(SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
Checks access for a hierarchy conversion.
Definition: SemaAccess.cpp:1863
clang::ADLResult
A class for storing results from argument-dependent lookup.
Definition: Lookup.h:823
clang::Sema::InstantiatingTemplate::ExceptionSpecification
Definition: Sema.h:9475
clang::Sema::deduceVarTypeFromInitializer
QualType deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init)
Definition: SemaDecl.cpp:12555
clang::prec::Spaceship
@ Spaceship
Definition: OperatorPrecedence.h:38
clang::Sema::NTCUC_BlockCapture
@ NTCUC_BlockCapture
Definition: Sema.h:3007
TypeLoc.h
clang::Sema::ExpressionEvaluationContextRecord::ReferenceToConsteval
llvm::SmallPtrSet< DeclRefExpr *, 4 > ReferenceToConsteval
Set of DeclRefExprs referencing a consteval function when used in a context not already known to be i...
Definition: Sema.h:1326
clang::Sema::InstantiateClassMembers
void InstantiateClassMembers(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiates the definitions of all of the member of the given class, which is an instantiation of a ...
Definition: SemaTemplateInstantiate.cpp:3650
clang::Sema::IsPointerConversion
bool IsPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC)
IsPointerConversion - Determines whether the conversion of the expression From, which has the (possib...
Definition: SemaOverload.cpp:2461
clang::Sema::getPrintable
static int getPrintable(int I)
Definition: Sema.h:2179
clang::Sema::FPFeaturesStateRAII
Records and restores the CurFPFeatures state on entry/exit of compound statements.
Definition: Sema.h:1605
clang::Sema::OSMK_Copy
@ OSMK_Copy
Definition: Sema.h:10381
clang::Sema::CodeCompleteObjCInterfaceCategory
void CodeCompleteObjCInterfaceCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
Definition: SemaCodeComplete.cpp:8509
clang::Sema::makeUnavailableInSystemHeader
bool makeUnavailableInSystemHeader(SourceLocation loc, UnavailableAttr::ImplicitReason reason)
makeUnavailableInSystemHeader - There is an error in the current context.
Definition: Sema.cpp:512
clang::Sema::ActOnOpenMPParallelForDirective
StmtResult ActOnOpenMPParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10882
clang::Sema::IncompatibleFunctionPointerStrict
@ IncompatibleFunctionPointerStrict
IncompatibleFunctionPointerStrict - The assignment is between two function pointer types that are not...
Definition: Sema.h:12386
clang::Sema::LookupMethodInObjectType
ObjCMethodDecl * LookupMethodInObjectType(Selector Sel, QualType Ty, bool IsInstance)
LookupMethodInType - Look up a method in an ObjCObjectType.
Definition: SemaExprObjC.cpp:1934
clang::Sema::checkThisInStaticMemberFunctionExceptionSpec
bool checkThisInStaticMemberFunctionExceptionSpec(CXXMethodDecl *Method)
Whether this' shows up in the exception specification of a static member function.
Definition: SemaDeclCXX.cpp:18308
clang::Sema::DelayedDiagnostics
class clang::Sema::DelayedDiagnostics DelayedDiagnostics
clang::Sema::ExpressionEvaluationContext::ImmediateFunctionContext
@ ImmediateFunctionContext
In addition of being constant evaluated, the current expression occurs in an immediate function conte...
clang::Sema::MethodMatchStrategy
MethodMatchStrategy
Definition: Sema.h:4848
clang::Sema::ActOnPragmaFPReassociate
void ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled)
Called on well formed #pragma clang fp reassociate.
Definition: SemaAttr.cpp:1308
clang::Sema::CCK_ForBuiltinOverloadedOp
@ CCK_ForBuiltinOverloadedOp
A conversion for an operand of a builtin overloaded operator.
Definition: Sema.h:12211
clang::Sema::ArgumentPackSubstitutionIndexRAII::ArgumentPackSubstitutionIndexRAII
ArgumentPackSubstitutionIndexRAII(Sema &Self, int NewSubstitutionIndex)
Definition: Sema.h:9435
clang::Sema::getNamedReturnInfo
NamedReturnInfo getNamedReturnInfo(Expr *&E, SimplerImplicitMoveMode Mode=SimplerImplicitMoveMode::Normal)
Determine whether the given expression might be move-eligible or copy-elidable in either a (co_)retur...
Definition: SemaStmt.cpp:3372
clang::Sema::InstantiatingTemplate::Clear
void Clear()
Note that we have finished instantiating this template.
Definition: SemaTemplateInstantiate.cpp:631
clang::Sema::CheckTemplatePartialSpecializationArgs
bool CheckTemplatePartialSpecializationArgs(SourceLocation Loc, TemplateDecl *PrimaryTemplate, unsigned NumExplicitArgs, ArrayRef< TemplateArgument > Args)
Check the non-type template arguments of a class template partial specialization according to C++ [te...
Definition: SemaTemplate.cpp:8524
clang::VirtSpecifiers
Represents a C++11 virt-specifier-seq.
Definition: DeclSpec.h:2687
clang::Sema::BoundTypeDiagnoser::Args
std::tuple< const Ts &... > Args
Definition: Sema.h:2198
clang::Sema::getCurCompoundScope
sema::CompoundScopeInfo & getCurCompoundScope() const
Definition: SemaStmt.cpp:405
clang::Sema::ActOnOpenMPSharedClause
OMPClause * ActOnOpenMPSharedClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'shared' clause.
Definition: SemaOpenMP.cpp:18603
clang::CXXMethodDecl
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1995
clang::Sema::NestedNameSpecInfo::NestedNameSpecInfo
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, ParsedType ObjectType=ParsedType())
Creates info object for the most typical case.
Definition: Sema.h:6939
clang::OpenMPOrderClauseModifier
OpenMPOrderClauseModifier
OpenMP modifiers for 'order' clause.
Definition: OpenMPKinds.h:171
clang::Sema::ActOnGenericSelectionExpr
ExprResult ActOnGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
Definition: SemaExpr.cpp:1611
clang::UnaryExprOrTypeTrait
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
Definition: TypeTraits.h:51
clang::Sema::getDefaultedComparisonKind
DefaultedComparisonKind getDefaultedComparisonKind(const FunctionDecl *FD)
Definition: Sema.h:3433
clang::Sema::checkRetainCycles
void checkRetainCycles(ObjCMessageExpr *msg)
checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle.
Definition: SemaChecking.cpp:16849
clang::Sema::TPL_TemplateTemplateParmMatch
@ TPL_TemplateTemplateParmMatch
We are matching the template parameter lists of two template template parameters as part of matching ...
Definition: Sema.h:8421
clang::Sema::CallingConventionIgnoredReason::VariadicFunction
@ VariadicFunction
clang::Sema::SwapSatisfactionStack
void SwapSatisfactionStack(llvm::SmallVectorImpl< SatisfactionStackEntryTy > &NewSS)
Definition: Sema.h:7326
clang::Sema::CheckDeductionGuideTemplate
void CheckDeductionGuideTemplate(FunctionTemplateDecl *TD)
Definition: SemaTemplate.cpp:4444
clang::Sema::ActOnPragmaAttributeAttribute
void ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules)
Definition: SemaAttr.cpp:942
clang::Sema::ActOnFinishInlineFunctionDef
void ActOnFinishInlineFunctionDef(FunctionDecl *D)
Definition: SemaDecl.cpp:14926
clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective
StmtResult ActOnOpenMPTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for simd' after parsing of the associate...
Definition: SemaOpenMP.cpp:14278
clang::Sema::LookupDefaultConstructor
CXXConstructorDecl * LookupDefaultConstructor(CXXRecordDecl *Class)
Look up the default constructor for the given class.
Definition: SemaLookup.cpp:3543
clang::ImplicitConversionSequence
ImplicitConversionSequence - Represents an implicit conversion sequence, which may be a standard conv...
Definition: Overload.h:517
clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers
void actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo * > identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl * > &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols)
Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol q...
Definition: SemaDeclObjC.cpp:1426
clang::TypeSpecifierType
TypeSpecifierType
Specifies the kind of type.
Definition: Specifiers.h:52
clang::Sema::FlagBitsCache
llvm::DenseMap< const EnumDecl *, llvm::APInt > FlagBitsCache
A cache of the flags available in enumerations with the flag_bits attribute.
Definition: Sema.h:1460
clang::Sema::DeclareTargetContextInfo::MapInfo::Loc
SourceLocation Loc
Definition: Sema.h:10929
clang::Sema::clearDelayedTypo
void clearDelayedTypo(TypoExpr *TE)
Clears the state of the given TypoExpr.
Definition: SemaLookup.cpp:5870
clang::Sema::CorrectDelayedTyposInExpr
ExprResult CorrectDelayedTyposInExpr(Expr *E, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and r...
Definition: SemaExprCXX.cpp:8747
clang::Sema::getASTConsumer
ASTConsumer & getASTConsumer() const
Definition: Sema.h:1663
clang::PreferredTypeBuilder::enterReturn
void enterReturn(Sema &S, SourceLocation Tok)
Definition: SemaCodeComplete.cpp:388
clang::Sema::DelayedEquivalentExceptionSpecChecks
SmallVector< std::pair< FunctionDecl *, FunctionDecl * >, 2 > DelayedEquivalentExceptionSpecChecks
All the function redeclarations seen during a class definition that had their exception spec checks d...
Definition: Sema.h:915
clang::Sema::BuildUsingDeclaration
NamedDecl * BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists)
Builds a using declaration.
Definition: SemaDeclCXX.cpp:12393
clang::Sema::ActOnOpenMPRegionStart
void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope)
Initialization of captured region for OpenMP region.
Definition: SemaOpenMP.cpp:4171
clang::Sema::BuildOperatorCoawaitCall
ExprResult BuildOperatorCoawaitCall(SourceLocation Loc, Expr *E, UnresolvedLookupExpr *Lookup)
Build a call to 'operator co_await' if there is a suitable operator for the given expression.
Definition: SemaCoroutine.cpp:251
clang::Sema::checkObjCBridgeRelatedComponents
bool checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose=true)
Definition: SemaExprObjC.cpp:4219
clang::Sema::ExpressionEvaluationContext::PotentiallyEvaluated
@ PotentiallyEvaluated
The current expression is potentially evaluated at run time, which means that code may be generated t...
clang::Sema::ActOnOpenMPNowaitClause
OMPClause * ActOnOpenMPNowaitClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nowait' clause.
Definition: SemaOpenMP.cpp:17404
clang::Sema::CheckSwitchCondition
ExprResult CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond)
Definition: SemaStmt.cpp:1026
clang::Sema::AddArgumentDependentLookupCandidates
void AddArgumentDependentLookupCandidates(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add function candidates found via argument-dependent lookup to the set of overloading candidates.
Definition: SemaOverload.cpp:9568
clang::Sema::CheckStructuredBindingMemberAccess
AccessResult CheckStructuredBindingMemberAccess(SourceLocation UseLoc, CXXRecordDecl *DecomposedClass, DeclAccessPair Field)
Checks implicit access to a member in a structured binding.
Definition: SemaAccess.cpp:1752
clang::Sema::ActOnOpenMPAllocateClause
OMPClause * ActOnOpenMPAllocateClause(Expr *Allocator, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocate' clause.
Definition: SemaOpenMP.cpp:23458
clang::Sema::areMatrixTypesOfTheSameDimension
bool areMatrixTypesOfTheSameDimension(QualType srcTy, QualType destTy)
Are the two types matrix types and do they have the same dimensions i.e.
Definition: SemaExpr.cpp:7947
clang::ExpressionTrait
ExpressionTrait
Definition: ExpressionTraits.h:21
clang::StorageClass
StorageClass
Storage classes.
Definition: Specifiers.h:236
clang::Sema::NTK_NonStruct
@ NTK_NonStruct
Definition: Sema.h:3287
clang::Sema::ActOnEmptyDeclaration
Decl * ActOnEmptyDeclaration(Scope *S, const ParsedAttributesView &AttrList, SourceLocation SemiLoc)
Handle a C++11 empty-declaration and attribute-declaration.
Definition: SemaDeclCXX.cpp:16419
clang::Sema::PragmaAttributeGroup::Loc
SourceLocation Loc
The location of the push attribute.
Definition: Sema.h:752